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