The cows have opened a new business, and Farmer John wants to see how well they are doing. The business operates for n (1≤n≤105) days, and on each i-th day, the cows record their net profit Pi (−1000≤Pi≤1000).
Farmer John wants to find the maximum profit that the cows have obtained during any consecutive period of time (note that a consecutive period of time can have a length from one day to n days). Help him by writing a program to find the maximum continuous profit.
The first line contains an integer n. Each of the next n lines contains one integer Pi.
Print the value of the maximum profit obtained during any consecutive period of time.