#include <bits/stdc++.h>
int main(int argc, char** argv) {
  int N;
  std::cin >> N;
  std::vector<int> values;
  for (int i = 0; i < N; ++i) {
    int V;
    std::cin >> V;
    values.push_back(V);
  }
  std::sort(std::begin(values), std::end(values));
  int x = values[0];
  for (int i = 1; i < N; ++i) {
    int y = values[i];
    x = (x + y) / 2;
  }
  std::cout << x << std::endl;
  return 0;
}
