#include <bits/stdc++.h>
int main(void) {
  int N;
  scanf("%d", &N);
  int *v;
  v = (int *)malloc(sizeof(int) * N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &v[i]);
  }
  if (N > 2) {
    int select2 = N * (N - 1) / 2;
    double *ave;
    ave = (double *)malloc(sizeof(double) * select2);
    for (int i = 0; i < N; i++) {
      for (int j = i + 1; j < N; j++) {
        ave[(i + 1) * j / 2] = (double)(v[i] + v[j]) / 2.0;
      }
    }
    double *ave_m;
    int ave_m_num = select2 * (select2 - 1);
    ave_m = (double *)malloc(sizeof(double) * ave_m_num);
    for (int i = 0; i < ave_m_num; i++) {
      for (int j = i + 1; j < ave_m_num; j++) {
        ave_m[(j - 1) * j / 2] = (double)(ave[i] + ave[j]) / 2.0;
      }
    }
    double max = ave_m[0];
    for (int i = 0; i < ave_m_num; i++) {
      if (ave_m[i] > max) {
        max = ave_m[i];
      }
    }
    printf("%lf", max);
    return 0;
  } else {
    printf("%lf", (v[0] + v[1]) / 2.0);
  }
  return 0;
}
