#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, b, i = 0;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  int sum1 = a[0];
  int sum2 = a[n - 1];
  for (i = 1; i < n; i++) {
    sum1 = (float)(sum1 + a[i]) / 2;
    x = (float)(sum1 + a[i + 1]) / 2;
  }
  for (i = n - 1; i > 0; i--) {
    sum2 = (float)(sum2 + a[i]) / 2;
    b = (float)(sum2 + a[i - 1]) / 2;
  }
  if (x > b) {
    cout << x;
  } else
    cout << b;
  return 0;
}
