#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,popcnt,tune=native")
using namespace std;
inline long long read() {
  int ch = getchar(), f = 1;
  long long ans = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = 0;
  for (; ch >= '0' && ch <= '9'; ch = getchar())
    ans = (((ans << 2) + ans) << 1) + (ch ^ '0');
  return f ? ans : -ans;
}
int n;
const int maxn = 55;
double a[maxn];
double f[maxn][maxn];
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) scanf("%lf", &a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) f[i][i] = a[i];
  for (int i = 2; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      int l = j, r = j + i - 1;
      for (int k = l; k < r; ++k) {
        f[l][r] = max(f[l][r], (f[l][k] + f[k + 1][r]) / 2);
      }
    }
  }
  printf("%.10f", f[1][n]);
  return 0;
}
