PROGRAMMING:Maximum subsegment sum problem
The largest subsegment and problem. Given a sequence of N integers, the maximum sum of subsegments of the sequence is obtained. If all integers are negative integers, the maximum sum of subsegments is defined as 0.
###Input format:
In the first line, enter the number of integers n (1 ≤ n ≤ 1000), and then enter n integers in turn.
###Output format:
Output the maximum number of sub segments and.
###Input sample 1:
```in
five
-2 11 -4 13 -5 -2
```
###Output sample 1:
```out
twenty
```
answer:If there is no answer, please comment
###Input format:
In the first line, enter the number of integers n (1 ≤ n ≤ 1000), and then enter n integers in turn.
###Output format:
Output the maximum number of sub segments and.
###Input sample 1:
```in
five
-2 11 -4 13 -5 -2
```
###Output sample 1:
```out
twenty
```
answer:If there is no answer, please comment