Maximum Coin Collection#7819

Maximum Coin Collection

1 second
64 megabytes
Easy

You are given a sequence of boxes, each containing a certain number of coins. You can collect coins from any box, but if you collect from one box, you cannot collect from its immediate neighbor. Your task is to determine the maximum total number of coins you can collect.

Input

The first line contains an integer (1 \leq N \leq 1000) — the number of boxes. The second line contains natural numbers, representing the number of coins in each box, with each value not exceeding .

Output

Output the maximum number of coins you can collect.

Examples

Example 1

Loading
Loading