#include <bits/stdc++.h>
int main(void) {
  int N;
  scanf("%d", &N);
  int v[N];
  for (int i = 0; i < N; i++) scanf("%d", &v[i]);
  int max[N];
  for (int i = 0; i < N; i++) max[i] = 0;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++) {
      if (max[i] < v[j]) max[i] = v[j];
      if (j == N - 1)
        for (int k = 0; k < N; k++)
          if (max[i] == v[k]) {
            v[k] = 0;
            break;
          }
    }
  int ans[N];
  for (int i = 0; i < N; i++) ans[i] = max[i] * pow(2, N - 2 - i);
  ans[N - 1] = max[N - 1];
  ans[N - 2] = max[N - 2];
  int bunsi = 0;
  for (int i = 0; i < N; i++) bunsi = ans[i] + bunsi;
  double answer;
  answer = bunsi / pow(2, N - 1);
  printf("%lf", answer);
  return 0;
}
