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