#include <bits/stdc++.h>
using namespace std;
  int main(){
    int N;
    cin >> N;
    int nabe;
    int g;
    int f;
    int h;
    int sum = 0;
    double ans = 0;
    double cash;
    double cash2;
    double cash3;
    int n;
    if(N%2 == 0){
      n = N/2;
    for(int i = 0 , i < n , i++){
    	cin >> g;
        sum = sum + g;
      }
      ans = sum/2;
      cout << ans;
    }
    if(N%3==0){
     n = N/3;
      for(int i = 0,i < n , i++){
      cin >> g;
      cin >> f;
        sum = g+h;
        cash = sum/2;
        cin >> h;
        cash2 = cash + h;
        cash3 = cash2/2;
        ans +=cash3;
      }
      cout << ans;
    }
  }