#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
const long long int LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MOD = 1000000007;
double dfs(int depth, vector<int> &vec, int left, int right) {
  if (left >= right) {
    return (double)(vec[left]) / (double)(pow(2, depth));
  }
  int N = right - left + 1;
  double ans = 0;
  for (int i = 1; i < (N / 2) + 1; ++i) {
    ans = max(ans, dfs(depth + 1, vec, left, left + i - 1) +
                       dfs(depth + 1, vec, left + i, right));
  }
  return ans;
}
int main() {
  int N;
  cin >> N;
  vector<int> V(N);
  for (int i = 0; i < (N); ++i) {
    cin >> V[i];
  }
  sort(V.begin(), V.end());
  reverse(V.begin(), V.end());
  if (N == 1) {
    cout << V[0] << endl;
    return 0;
  }
  double ans = 0;
  for (int i = 1; i < (N / 2) + 1; ++i) {
    ans = max(ans, dfs(1, V, 0, i - 1) + dfs(1, V, i, N - 1));
  }
  cout << setprecision(30) << ans << endl;
  return 0;
}
