In a given array of numbers, your task is to find a subarray with the largest possible sum. The subarray must contain at least one element.
The first line contains one integer (1 \leq n \leq 10^5), representing the number of elements in the array.
The second line contains integers a_1, a_2, \ldots, a_n (-10^4 \leq a_i \leq 10^4), representing the elements of the array.
Print one integer, representing the largest possible sum of a subarray.
Example
5
-2 1 -3 4 -1 2 1 -5 46Example 1
Example 2
In the given example, the subarray with the largest sum is [4, -1, 2, 1], whose sum equals .