Profit
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The cows have opened a new business, and Farmer John wants to see how well they are doing. The business operates for days, and on each -th day, the cows record their net profit .
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 days). Help him by writing a program to find the maximum continuous profit.
Input
The first line contains an integer . Each of the next lines contains one integer .
Output
Print the value of the maximum profit obtained during any consecutive period of time.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 47%