#include<iostream>
using namespace std;int main(){ int N, j; while(cin >> N){ for(j=0; j<N; j++) cin >> a[j]; for(j=0; j<N; j+=2) left+=a[j] for(j=1; j<N; j+=2) right+=a[j]