#include <bits/stdc++.h>
using namespace std;
namespace {
void printElems(const int* begin, const int* end) {
  for (const int* p = begin; p != end; ++p) {
    std::cout << *p << std::ends;
  }
  std::cout << std::endl;
}
}  // namespace
int main() {
  int n;
  cin >> n;
  int vec[n];
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  std::sort(vec, vec + (sizeof(vec) / sizeof(vec[0])));
  int start = vec[0];
  int value = start;
  for (int i = 1; i < n; i++) {
    value = (vec[i] + value) / 2;
  }
  cout << value << endl;
}
