You are given an array of prices, where contains the price of a stock on the -th day.
Each day, you can decide whether to buy and/or sell stocks. At any given time, you can own at most one stock.
Find the maximum profit that can be obtained.
The first line contains the size of the price array. The second line contains the price array - integers, each not exceeding .
Print the maximum profit that can be obtained. If it is impossible to obtain a profit, output .