#include<bits/stdc++.h>
using namespace std;
int n, a[100005];
int main() {
cin >> n;
for (int i = 0; i <= n - 1; i++)
cin >> a[i];
long long Ans = 0;
for (int i = 0; i <= n - 1; i++)
if (i % 2 == 1)
Ans += a[i];
cout << Ans;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbiwgYVsxMDAwMDVdOwoKCmludCBtYWluKCkgewogICAgY2luID4+IG47CiAgICBmb3IgKGludCBpID0gMDsgaSA8PSBuIC0gMTsgaSsrKQogICAgICAgIGNpbiA+PiBhW2ldOwogICAgbG9uZyBsb25nIEFucyA9IDA7CiAgICBmb3IgKGludCBpID0gMDsgaSA8PSBuIC0gMTsgaSsrKQogICAgICAgIGlmIChpICUgMiA9PSAxKQogICAgICAgICAgICBBbnMgKz0gYVtpXTsKCiAgICBjb3V0IDw8IEFuczsKCn0K