#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (n); i++) cin >> v.at(i);
  sort(v.begin(), v.end());
  int ans = 0;
  for (int i = 0; i < (n - 1); i++) {
    ans = (v.at(i) + v.at(i + 1)) / 2;
    v.at(i + 1) = (v.at(i) + v.at(i + 1)) / 2;
  }
  cout << ans << endl;
  return 0;
}
