int main()
{
  int n;
  cin >> n;
  vector<int> storage(n);
  for (int i = 0; i < n; ++i)
  {
    cin >> storage[i];
  }
  sort(storage.begin(), storage.end());
  int sum = storage[0] + storage[1];
  sum /= 2;
  for (int i = 2; i < n; ++i)
  {
    sum += storage[i];
    sum /= 2;
  }
  cout << sum << endl;

  return 0;
}