Corruption is always extremely hard to prove. Even when we know that certain people accept bribes, it is almost impossible to punish them, because the only witnesses are those people and the ones who offered the bribe, and neither side is likely to testify.
One way to prove that something illegal happened is to count how much money a person holds and then show that it was impossible to earn that money legally. This is not easy, however: the person can simply claim that the money was a gift from an uncle or was earned by trading stocks.
We would like to check such explanations. Since we cannot verify the existence of "uncles," we will focus on the stocks. Given the price history of a stock, your task is to compute the maximum profit that could possibly have been earned by buying and then selling the stock.
The input consists of several scenarios. Each scenario is given on two lines.
The first line contains two positive integers $D$ and $M$ ($1 \le D \le 70000$, $1 \le M \le 40000$) separated by a space. $D$ is the number of trading days and $M$ is the amount of money available at the beginning.
The second line contains $D$ positive integers $p_1, p_2, \ldots, p_D$ ($1 \le p_i \le 40000$) separated by spaces. $p_i$ is the price of one share on day $i$, meaning that on that day you can buy or sell one share for that price.
The last scenario is followed by a line containing a single zero.
For each scenario, print one line with a single number: the maximum profit achievable with at most one Buy operation followed by at most one Sell operation. Assume you own no shares at the beginning and that you may perform only one Buy during the whole period.
You may buy as many whole shares as your money allows, but only whole shares (an integer number), never fractions. For example, if a share costs $3 and you have $11, you can buy only 3 shares.
The Buy operation is followed by exactly one Sell operation on one of the later days. Naturally, to maximize the profit it is best to sell all the shares you hold.