Prize Collection#1619

Prize Collection

1 second
128 megabytes
Very easy

In a video game, prize boxes are arranged in a row. Each box contains a certain number of points. According to the game rules, you cannot choose adjacent boxes — if two neighboring boxes are opened, the alarm system will trigger, and you will lose all the prizes.

Given the number of points in each box, determine the maximum number of points you can collect without triggering the alarm.

Input

The first line contains the number of boxes n~(1 \le n \le 10^6). The second line contains non-negative integers a_1, a_2, \ldots, a_n, where a_i is the number of points that can be obtained from the -th box.

Output

Print the maximum number of points that can be collected without triggering the alarm.

Examples

Example 1

Loading
Loading