#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int a[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  int ave = (a[1] + a[2]) / 2;
  for (int i = 3; i <= n; i++) {
    ave = (ave + a[i]) / 2;
  }
  cout << ave;
  return 0;
}
