#include <bits/stdc++.h>
using namespace std;
template <class T>
void print_vect(std::vector<T> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  for (int i = 1; i < n; i++) {
    v[i] = (v[i] + v[i - 1]) / 2;
  }
  cout << v.back() << endl;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  solve();
  return 0;
}
