#include <bits/stdc++.h>
void quickSort(int *v, int startID, int endID) {
  int pivot = v[(int)((startID + endID) / 2)];
  int left = startID;
  int right = endID;
  while (1) {
    while (v[left] < pivot) {
      left++;
    }
    while (pivot < v[left]) {
      right--;
    }
    if (right <= left) {
      break;
    }
    int tmp = v[left];
    v[left] = v[right];
    v[right] = tmp;
    left++;
    right--;
  }
  if (startID < left - 1) {
    quickSort(v, startID, left - 1);
  }
  if (right + 1 < endID) {
    quickSort(v, right + 1, endID);
  }
}
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);
  quickSort(v, 0, length - 1);
  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);
}
