#CCBCHBA0000023. Cộng số tại vị trí chẵn (Sum Values at Even Positions)

Cộng số tại vị trí chẵn (Sum Values at Even Positions)

Sum Values at Even Positions

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Sum values at 1-based positions 2,4,6,...; the positions, not the values, must be even.

Input

n in [0,100000] followed by n integers in [-1000000,1000000].

Output

64-bit sum; print 0 if no even position exists.

Subtasks

  • Subtask 1 (20%): n≤5n\le5, ∣ai∣≤10|a_i|\le10.
  • Subtask 2 (30%): n≤100n\le100, ∣ai∣≤1000|a_i|\le1000.
  • Subtask 3 (50%): n≤100000n\le100000, ∣ai∣≤106|a_i|\le10^6.

Examples

Example 1

Input

5
8 -3 4 7 2

Output

4

Explanation

Take positions 2 and 4: -3+7=4.

Example 2

Input

1
6

Output

0

Explanation

There is no even position.