#include <bits/stdc++.h>
int main(void) {
  int N;
  int v[50];
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &v[i]);
  }
  int length = sizeof(v) / sizeof(int);
  for (int i = 0; i < length - 1; i++) {
    for (int j = length - 1; j > i; i--) {
      if (v[j] < v[j - 1]) {
        int tmp = v[j];
        v[j] = v[j - 1];
        v[j - 1] = tmp;
      }
    }
  }
  int sum = (v[0] + v[1]) / 2;
  if (N >= 3) {
    for (int i = 2; i < N - 1; i++) {
      sum = (sum + v[i]) / 2;
    }
  }
  printf("%d", sum);
}
