#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, A[100], k, s = 0;
  cin >> n;
  int j = 3;
  for (int i = 1; i <= n / 2; i++) {
    cin >> A[i];
    s += A[i];
  }
  cout << s - (s / A[(n / 4) + 1]);
}
