#K9856. Minimum Streetlights Placement

    ID: 39122 Type: Default 1000ms 256MiB

Minimum Streetlights Placement

Minimum Streetlights Placement

You are given a highway of length \(L\) units. Your task is to determine the minimum number of streetlights required such that the distance between any two consecutive streetlights is at least \(d\) units.

The minimum number of streetlights required is given by the formula \(\left\lfloor \frac{L}{d} \right\rfloor + 1\). However, there is a constraint: you are allowed to use at most \(M\) streetlights. If it is impossible to cover the highway under these restrictions, print "Impossible".

Input: Three integers \(L\), \(d\) and \(M\), where \(L\) is the length of the highway.

Output: Print a single value which is either the minimum number of streetlights needed or the string "Impossible" if it cannot be achieved under the given constraints.

inputFormat

The input consists of a single line containing three space-separated integers \(L\), \(d\), and \(M\):

  • \(L\) (1 \(\le\) L \(\le\) 109) is the length of the highway.
  • \(d\) (1 \(\le\) d \(\le\) L) is the minimum distance required between consecutive streetlights.
  • \(M\) (1 \(\le\) M \(\le\) 109) is the maximum number of streetlights allowed.

outputFormat

Output a single line containing the minimum number of streetlights required. If the computed number exceeds \(M\), output "Impossible".

## sample
10 3 5
4