Little Tunar sees candy packs placed consecutively along a long path in a fairytale land. On each pack, the number of candies inside is indicated. Tunar can take two packs in each hand, but these packs must be adjacent along the path.
I wonder how many candies Tunar can take at most?
The first line of the input provides (4 \le N \le 10000), the number of packs. Then, the quantities of candies written on the packs placed along the path are given as k_1, k_2, k_3, ..., k_n.
Print the answer to the question of the problem.
Example 1
In the example, Tunar can choose the adjacent packs and to take a maximum of 8 + 5 + 7 + 8 = 28 candies.