#include <bits/stdc++.h>
// #define int long long
using namespace std;
using ll = long long;
using ull = unsigned long long;
signed main()
{
// ios::sync_with_stdio(false);
// cin.tie(0);
// cout.tie(0);
// freopen(".in", "r", stdin);
// freopen(".out", "w", stdout);
int n;
cin >> n;
int ans = 0;
bool flag = true;
while (n--)
{
int a;
cin >> a;
a = (flag ? a : 0);
ans += a;
flag = !flag;
}
cout << ans << endl;
return 0;
}