Given a sequence a1,a2,...,an of length n. Find its subsequence ai1,ai2,...,aik such that
the numbers in the subsequence are sorted in strictly ascending order.
the sum of numbers in the subsequence ai1+ai2+...+aik is the biggest
The first line contains the size of array n (n≤104).The second line contains n integers ai (0≤ai≤105).
Print the sum of the maximum sum subsequence.
For example, if input is {3,2,100,4,5,6}, then output should be 103 (3+100).