#include <bits/stdc++.h>
void Swap(float& a, float& b) {
  float temp = a;
  a = b;
  b = temp;
}
void InsertSor(float src[], int n) {
  for (int i = 1; i < n; ++i) {
    for (int j = i; j >= 1; --j) {
      Swap(src[i], src[j]);
    }
  }
}
int main() {
  int N;
  std::cin >> N;
  float* ana;
  ana = new float[N];
  for (int i = 0; i < N; i++) {
    std::cin >> ana[i];
  }
  for (int i = 0; i < N - 1; ++i) {
    InsertSor(ana, N - i);
    float new_gu = (ana[N - i - 1] + ana[N - i - 2]) / 2.0;
    ana[N - i - 2] = new_gu;
  }
  std::cout << (int)ana[0];
  delete[] ana;
  return 0;
}
