Stonks

Peter is a secret spy working against the Soviet Union. In order to fund his work, he creates a simple algorithm that will predict, with 100% accuracy, the future price of any stock in the world. To maximize the profits, he needs to figure out which stock to invest in. Can you help him?


Input Specification

The first line of input contains an integer \(N\). \((2 \le N \le 10^6)\)

The next N lines of input contains a single integer \(C_i\), the price of the stock at day \(i\). \((0 \le C_i \le 10^7)\)


Output Specification

Output, in one line, an integer representing the maximum amount of profit that could be made from trading the stock in question.

If no profit can be made, output scam.


Sample Input 1

6
1
6
3
9
4
5


Sample Output 1

8


Sample Explanation 1

Peter can buy this stock when it is valued at \(1\), and sell this stock when it is valued at \(9\), generating a profit of \((9-1)\)


Sample Input 2

3
10
1
1


Sample Output 2

scam
Comments
  • There are no comments.