#include <bits/stdc++.h>
using namespace std;
long long N, d, a[(int)1e5 + 5], sum;
inline void read(long long &x) {
  x = 0;
  bool f = 0;
  char ch = getchar();
  for (; !(ch >= '0' && ch <= '9'); ch = getchar()) f |= ch == '-';
  for (; (ch >= '0' && ch <= '9'); ch = getchar())
    x = (x << 3) + (x << 1) + (ch ^ 48);
  x = f ? -x : x;
}
int main() {
  read(N);
  for (int i = 1; i <= N; ++i) read(a[i]);
  sort(a + 1, a + 1 + N);
  sum = a[1];
  for (int i = 2; i <= N; ++i) sum = (sum + a[i]) >> 1;
  cout << sum;
  return 0;
}
