#include <bits/stdc++.h>
int v[50];
double function(int n) {
  if (n == 2) return (v[0] + v[1]) / 2.0;
  return (function(n - 1) + v[n - 1]) / 2.0;
}
void swap(int *x, int *y) {
  int temp;
  temp = *y;
  *y = *x;
  *x = temp;
}
int main() {
  int n, i, j;
  double answer, max = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &v[i]);
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j + 1 < n; j++) {
      swap(&v[j], &v[j + 1]);
      answer = function(n);
      if (answer > max) max = answer;
    }
  }
  printf("%lf\n", max);
  return 0;
}
