#include <bits/stdc++.h>
using namespace std;
int g(int a, int b) { return (a + b) / 2; }
int main() {
  long long N;
  cin >> N;
  vector<int> v(N);
  for (int i = 0; i < N; i++) {
    cin >> v.at(i);
  }
  stable_sort(v.begin(), v.end());
  for (long long i = 1; i < N; i++) {
    v.at(i) = g(v.at(i), v.at(i - 1));
  }
  cout << v.at(N) << endl;
}
