#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int X = 0; X < N; X++) {
    cin >> vec.at(X);
  }
  sort(vec.begin(), vec.end());
  int M = (vec.at(0) + vec.at(1)) / 2;
  for (int X = 2; X < N; X++) {
    M = (M + vec.at(X)) / 2;
  }
  cout << M << endl;
}
