How do spiders walk on water?

Time limit1sMemory limit128 MB

Problem

Some kinds of spiders can walk on water, but a spider can get into trouble when it walks near a waterfall.

The water in ponds, or in the calm parts of rivers, is suitable for a spider to walk on. When a spider notices that the water is moving, it jumps in the opposite direction. The danger is that the water moves faster and faster as the spider gets farther from the calm water. A spider is strong enough to walk against the current as long as the water speed is at most its jumping power $P$.

A waterfall causes a sharp increase in water speed. So whenever the water just before the edge of a waterfall moves slower than the spider's jumping power, the spider cannot detect the waterfall and may fall, because it believes it can easily return to the calm water. If a spider walks in a region where the water speed is greater than its jumping power, the spider falls.

Usually the water speed near a waterfall follows no fixed pattern, but in some cases we have found that the water speed at distance $m$ from the calm water depends linearly on the speeds at distances $m - 1$ and $m - 2$. In those cases we have measured the speed for the first few meters, so the speed at every point up to the waterfall can be computed.

We want to know the minimum distance to the waterfall that the spider can reach and still return safely.

Input

The input consists of several cases, one per line. Each case is given by several integers: $D, P, S_0, S_1, S_2, \dots$

$D$ is the distance in meters from the calm water to the waterfall ($2 < D \le 10000$). $P$ is the jumping power of the spider ($1 < P \le 1000$). The remaining numbers are the water speeds as the spider approaches the waterfall: $S_0$ is the speed in the calm-water area, $S_1$ the speed one meter from the calm water, $S_2$ the speed two meters from the calm water, and so on. Depending on the case this list can be longer, with at most $D + 1$ values. When the speeds do not follow a known pattern, all $D + 1$ values are given; otherwise at least four values are given. Every speed sequence is nondecreasing, and every speed is an integer.

Output

For each case, print an integer on its own line: the minimum distance to the waterfall at which the spider can still be on the water. This distance equals $D - m$, where $m$ is the largest index with $S_m \le P$ (the farthest position the spider can safely reach).

However, in the following cases print the message instead:

  • If the spider's jumping power is greater than or equal to the water speed just before the waterfall (the speed at distance $D - 1$), print The spider may fall!, because the spider cannot detect the waterfall.
  • If the spider's jumping power is lower than the water speed in the pond or river (that is, lower than the calm-water speed $S_0$), print The spider is going to fall!.