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