#include <bits/stdc++.h>
using namespace std;
template <typename T>
void remove(vector<T>& vector, unsigned long long index) {
  vector.erase(vector.begin() + index);
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> a;
  for (long long i = 0; i < n; i++) {
    long long tmp;
    cin >> tmp;
    a.push_back(tmp);
  }
  sort(a.begin(), a.end());
  while (a.size() != 1) {
    a[1] = (a[0] + a[1]) / 2;
    remove(a, 0);
    sort(a.begin(), a.end());
  }
  cout << a[0] << endl;
}
