#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int arr[n], i, s = 0, d = 0;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  s = arr[0];
  for (i = 0; i < n; i++) {
    s = (s + arr[i]) / 2;
  }
  cout << s << endl;
  return 0;
}
