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