Sanggeun rides a bicycle to school. The bicycle road consists of uphill parts, downhill parts, and flat parts. On the first day of class, he measured the road height at regular distances and wants to find the size of the largest uphill segment.
The measured heights form a sequence of length N. An uphill segment is a consecutive part of the sequence with at least two heights where each height is strictly greater than the previous one. The size of an uphill segment is the difference between its last height and its first height.
For example, consider the heights 12, 3, 5, 7, 10, 6, 1, 11. There are two uphill segments: 3, 5, 7, 10 and 1, 11. Their sizes are 7 and 10, respectively. The positions with heights 12 and 6 are not part of any uphill segment.
Write a program that finds the size of the largest uphill segment.
The first line contains N (1 <= N <= 1000), the number of measured heights. The second line contains N positive integers Pi (1 <= Pi <= 1000), where each number is a measured height.
Print the size of the largest uphill segment on the first line. If there is no uphill segment, print 0.