#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[51];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int sum = *a;
  int m = n - 1, p = pow(2, m), q = p;
  for (int i = n - 1; i > 0; i--) {
    sum += (a[i] * (p / 2));
    p = p / 2;
  }
  cout << (sum / q) << '\n';
  return 0;
}
