#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int ar[n];
  for (int i = 0; i < n; i++) cin >> ar[i];
  sort(ar, ar + n);
  int ans = (ar[0] + ar[1]) / 2;
  for (int i = 2; i < n; i++) ans = (ans + ar[i]) / 2;
  cout << ans << "\n";
  return 0;
}
