#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int N;
  cin >> N;
  int vals[N + 5];
  for (size_t i = 0; i < N; ++i) {
    cin >> vals[i];
  }
  if (N == 2) {
    return (int)(vals[0] + vals[1] / 2);
  }
  std::sort(vals, vals + N);
  if (vals[0] == vals[N - 1]) {
    return vals[0];
  }
  double result = vals[0];
  for (size_t i = 1; i < N; ++i) {
    result = (result + vals[i]) / 2;
  }
  cout << (int)result;
  return 0;
}
