#include <bits/stdc++.h>
int main(void) {
  int n;
  scanf("%d", &n);
  double v[55];
  for (int i = 0; i < n; i++) {
    scanf("%lf", &v[i]);
  }
  double max;
  double max1;
  max = 0;
  max1 = v[0];
  double temp;
  for (int i = 0; i < n; i++) {
    if (max1 < v[i]) {
      max1 = v[i];
      max = i;
    }
  }
  double ans = 0;
  double sum = 0;
  int cnt = 0;
  if (n == 2) {
    ans = (v[0] + v[1]) / 2;
    printf("%lf\n", ans);
    return 0;
  } else {
    for (int i = 0; i < n; i++) {
      if (max != i) {
        cnt++;
        sum += v[i];
        if (cnt == 2) {
          ans = sum / 2;
          cnt = 0;
          sum = 0;
        }
      }
    }
  }
  ans = (ans + v[(int)max]) / 2;
  printf("%lf\n", ans);
  return 0;
}
