#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  double M = -1e9, tmp, count[n + 10];
  int arr[n + 10], i, j = 0;
  for (i = 0; i < n; i++) scanf("%d", &arr[i]);
  tmp = arr[n - 1];
  for (i = n - 2; i >= 0; i--) {
    tmp += arr[i];
    tmp /= 2;
    count[j] = tmp;
    j++;
  }
  for (i = 0; i < j; i++) {
    if (M <= count[i]) M = count[i];
  }
  printf("%.5lf\n", M);
  return 0;
}
