#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> v;
int solve();
int main() {
  cin >> N;
  v = vector<int>(N);
  for (int i = 0; i < N; i++) {
    cin >> v.at(i);
  }
  solve();
}
int solve() {
  for (int i = 0; i < N - 1; i++) {
    sort(v.begin(), v.end());
    v.push_back((v.at(0) + v.at(1)) / 2);
    v.erase(v.begin() + 0);
    if (v.size() > 1) {
      v.erase(v.begin() + 0);
    }
  }
  cout << v.at(0) << endl;
  return 0;
}
