Assume that the input array of n positive integers can be cut into two halves (二分之一) that have an equal sum.
Your task is to find the equal sum. (We guarantee that there is always an answer.)
For example, if the input is 2 3 5 6 4, the answer is 10 since 2+3+5=6+4.
The first line contains an integer n (2 <= n <= 1000).
The second line contains n positive integers a1 ~ an (0 <= ai <= 109).
The output is a single line that contains the equal sum.
Remember that you have to put a '\n' at the end of the line, whatever it takes.