Pokemon Trading

With a fixed budget, buy on one day and sell on a later day to maximize profit; report the best result rounded to two decimals.

Medium4ArrayGreedyMathNo attempts yetTime limit0.3sMemory limit4 MB

Problem

Jim likes Pokemon and plays every game they appear in. The game he plays now is a trading game. Jim already knows the price of a Pokemon on each of the next nn days. The type does not matter, so a single price applies to every Pokemon on a given day.

Jim starts with a fixed amount of money. He picks one day and spends all of his money buying Pokemon on that day, then picks a later day and sells all of them. Fractional Pokemon can be bought. The selling day must come after the buying day.

Find the largest profit Jim can get. If every choice loses money, find the smallest loss.

Input

The first line contains the amount of money Jim has.

The second line contains the number of days nn. (1<n1061 < n \le 10^6)

Starting from the third line, nn prices are given in day order, separated by spaces.

The money and every price are positive real numbers of at most 10910^9 with at most 6 digits after the decimal point.

Output

Print the maximum profit on the first line, with 2 digits after the decimal point. The value is negative when Jim loses money.

Rounding goes away from zero. That is, 0.0050.005 becomes 0.01, 0.00490.0049 becomes 0.00, 0.005-0.005 becomes -0.01, and 0.0049-0.0049 becomes -0.00. When the profit is less than 00 but its rounded magnitude is 00, print -0.00.