#P2593. Max Sequence
Give you N integers a1, a2 ... aN (|ai| <=1000, 1 <= i <= N).
You should output S.
The input will consist of several test cases. For each test case, one integer N (2 <= N <= 100000) is given in the first line. Second line contains N integers. The input is terminated by a single line with N = 0.
For each test of the input, print a line containing S.
5 -5 9 -5 11 20 0