#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, x;
  cin >> n;
  vector<int> arr;
  for (i = 0; i < n; i++) {
    cin >> x;
    arr.push_back(x);
  }
  sort(arr.begin(), arr.end());
  while (arr.size() != 1) {
    int a = arr[0] + arr[n - 1];
    arr.erase(arr.begin());
    vector<int>::iterator it;
    for (it = arr.begin(); it + 1 != arr.end(); it++)
      ;
    arr.erase(it);
    arr.push_back(a / 2);
    sort(arr.begin(), arr.end());
  }
  cout << arr[0] << endl;
}
