#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
multiset<long long> st;
long long N, M;
vector<pair<long long, long long> > v;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (long long i = 0; i < (long long)n; i++) cin >> v[i];
  sort(v.begin(), v.end());
  for (long long i = 0; i < (long long)n - 1; i++) {
    v[i + 1] = (v[i] + v[i + 1]) / 2;
  }
  cout << v[n - 1] << endl;
}
