#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
template <typename T>
T POW(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * POW(B, P - 1);
  else
    return (POW(B, P / 2)) * (POW(B, P / 2));
}
long long powmod(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % 100000007;
    a = a * a % 100000007;
    b >>= 1;
  }
  return ans;
}
long long prime[1000000];
bool visprime[10000000];
void sieve() {
  long long k = 0;
  for (long long i = 2; i * i <= 1000000; i++) {
    for (long long j = i * i; j <= 1000000; j += i) {
      visprime[j] = true;
    }
  }
  for (long long i = 2; i <= 1000000; i++) {
    if (visprime[i] == false) prime[k++] = i;
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  vector<int> trr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 1; i <= n; i++) trr[i - 1] = i;
  vector<int> next[30000];
  for (int i = 0; i < n; i++) next[0].push_back(trr[i]);
  int k = 1;
  while (next_permutation(trr.begin(), trr.end())) {
    for (int i = 0; i < n; i++) {
      next[k].push_back(trr[i]);
    }
    k++;
  }
  double mx = -1.0;
  for (int i = 0; i < k; i++) {
    double prev = 0;
    int a, b;
    a = next[i][0] - 1;
    b = next[i][1] - 1;
    prev = (arr[a] + arr[b]) * 1.0 / 2.0;
    for (int j = 2; j < n; j++) {
      int k = next[i][j] - 1;
      double temp = 1.0 * (arr[k] + prev) / 2.0;
      prev = temp;
    }
    mx = max(mx, prev);
  }
  printf("%.5f\n", mx);
}
