#include <bits/stdc++.h>
double max(double a, double b);
double maxpath(int s, int N);
double v[52], value[52], d[52][52], cost[52], nmax;
int main(void) {
  int N, i, j;
  char str[1000], *p;
  fgets(str, sizeof(str), stdin);
  N = atoi(str);
  fgets(str, sizeof(str), stdin);
  p = strtok(str, " \n");
  v[0] = atof(p);
  for (i = 1; i < N; i++) {
    p = strtok(NULL, " \n");
    v[i] = atof(p);
  }
  for (i = 0; i < N; i++) {
    for (j = 0; j < i; j++) {
      d[i][j] = (v[i] + v[j]) / 2.0;
    }
  }
  for (i = 0; i < N; i++) {
    cost[i] = maxpath(i, N);
    if (nmax < cost[i]) nmax = cost[i];
  }
  printf("%f\n", nmax);
  return 0;
}
double max(double a, double b) {
  if (a >= b) {
    return a;
  } else {
    return b;
  }
}
double maxpath(int s, int N) {
  int u, w, used[52], i, j;
  for (i = 0; i < N; i++) {
    value[i] = -100000000.0;
    used[i] = 0;
  }
  value[s] = 0.0;
  for (;;) {
    w = -1;
    for (u = 0; u < N; u++) {
      if (used[u] == 0 && (w = -1 || value[u] > value[w])) w = u;
    }
    if (w == -1) break;
    used[w] = 1;
    for (u = 0; u < N; u++) {
      if (value[u] < d[w][u]) {
        value[u] = d[w][u];
        v[u] = (v[u] + v[w]) / 2.0;
        v[w] = (v[u] + v[w]) / 2.0;
        for (i = 0; i < N; i++) {
          for (j = 0; j < i; j++) {
            d[i][j] = (v[i] + v[j]) / 2.0;
          }
        }
      }
    }
  }
  return value[s];
}
