#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int ans = 0;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  sort(A.begin(), A.end());
  for (int k = 0; k < N; k++) {
    A[k + 1] = (A[k] + A[k + 1]) / 2;
  }
  cout << A[N - 1] << endl;
}
