#include <bits/stdc++.h>
using namespace std;
vector<long long> vec;
int n;
double func(long long a) {
  if (a < 1) return 0;
  if (a == 1)
    return (double)(vec[0] + vec[1]) / 2;
  else
    return max((double)(func(a - 1) + vec[a]),
               (double)func(a - 2) + (double)(vec[a - 1] + vec[a]) / 2) /
           2;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long a;
    cin >> a;
    vec.push_back(a);
  }
  sort(vec.begin(), vec.end());
  cout << func(n - 1) << endl;
}
