#include <bits/stdc++.h>
const int MOD = 1000 * 1000 * 1000 + 7;
const int N = 1000 * 1000;
using namespace std;
clock_t time_p = clock();
void dem() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> ing(n, 0);
  for (int &x : ing) cin >> x;
  sort((ing).begin(), (ing).end());
  int res = (ing[0] + ing[1]) / 2;
  for (int i = 2; i < n; ++i) res = (res + ing[i]) / 2;
  cout << res;
  return 0;
}
