#include <bits/stdc++.h>
using namespace std;
int power(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
double ans11;
double max_sum(vector<double> v, int i, int j, double sum) {
  if (i > j) {
    ans11 = sum;
    return -19;
  } else
    return (max(max_sum(v, i + 1, j, (sum + v[i]) / 2),
                max_sum(v, i, j - 1, (sum + v[j] / 2))));
}
int main() {
  int n;
  cin >> n;
  int count = 0;
  vector<double> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int start = 1;
  int end = n - 2;
  sort(v.begin(), v.end());
  double ans = max(max_sum(v, start, end + 1, v[start - 1]),
                   max_sum(v, start - 1, end, v[end + 1]));
  cout << ans11 << "\n";
  return 0;
}
