#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int N;
  cin >> N;
  vector<int> vals;
  vals.reserve(N);
  for (size_t i = 0; i < N; ++i) {
    int temp;
    cin >> temp;
    vals.emplace_back(temp);
  }
  if (N == 2) {
    return (int)((vals.front() + vals.back()) / 2);
  }
  std::sort(vals.begin(), vals.end());
  if (vals.front() == vals.back()) {
    return vals.front();
  }
  int result = (vals[0] + vals[1]) / 2;
  for (size_t i = 2; i < N; ++i) {
    result = (result + vals[i]) / 2;
  }
  cout << result;
  return 0;
}
