#include <iostream>
#include <vector>
using namespace std;

int main(){
    int n,res;
    cin >> n;
    vector<int> v(n);
    for(int i = 0;i < n;i++){
        cin >> v.at(i);
    }
    res = v.at(0);
    for(i = 1;i < n;i++){
        res = (res+v.at(i))/2;
    }
    cout << res << endl;
}