#include <bits/stdc++.h>
int main(void) {
  int N, i, j, v[55], temp, max = 0, submax = 0;
  double ans;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d", &v[i]);
  }
  for (i = 0; i < N; i++) {
    for (j = i + 1; j < N - 1; j++) {
      if (v[i] > v[j]) {
        temp = v[i];
        v[i] = v[j];
        v[j] = temp;
      }
    }
  }
  submax = v[i - 1];
  max = v[i];
  ans = (v[0] + v[1]) / (double)2.0;
  if (N >= 3) {
    for (i = 2; i <= N - 1; i++) {
      ans = (ans + v[i]) / (double)2.0;
    }
  }
  if (ans > (v[i] + v[i - 1]) / (double)2.0) {
    printf("%f", ans);
  } else {
    printf("%f", (v[i] + v[i - 1]) / (double)2.0);
  }
}
