The little boy found himself in a fairy land and saw a road along which bags of candy were laid out. Each bag displays the number of candies it contains. The boy can take two adjacent bags in each hand. What is the greatest number of candies he can take?
The only line contains the number of bags (4 \leq N \leq 10000), followed by non-negative integers separated by spaces — the number of candies in each bag (each number does not exceed ).
Print a single number — the answer to the problem.
Example 1