#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, ave = 0, j = 0;
  cin >> n;
  vector<double> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v.at(i);
  }
  double min1 = v.at(0);
  double min2 = v.at(1);
  double mx = v.at(0);
  while (j < n - 2) {
    for (int i = 0; i < n; i++) {
      if (v.at(i) <= min1) {
        min1 = v.at(i);
      }
      if (v.at(i) <= min2) {
        if (v.at(i) > min1) {
          min2 = v.at(i);
        }
      }
    }
    ave = (min1 + min2) / 2;
    for (int i = 0; i < n; i++) {
      if ((v.at(i) == min1) || (v.at(i) == min2)) {
        v.at(i) = ave;
      }
    }
    j += 1;
  }
  if (n > 2) {
    for (int i = 0; i < n; i++) {
      if (v.at(i) >= mx) {
        mx = v.at(i);
      }
    }
    cout << (ave + mx) / 2 << endl;
  } else {
    ave = (min1 + min2) / 2;
    cout << ave << endl;
  }
}
