#include <bits/stdc++.h>
using namespace std;
struct compare {
  bool operator()(const string& first, const string& second) {
    return first.size() > second.size();
  }
};
void solve() {
  long n;
  cin >> n;
  vector<double> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  double x, mx = 0;
  vector<double> v1;
  if (n == 2) {
    cout << (v[0] + v[1]) / 2 << endl;
  } else {
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        v1.push_back((v[i] + v[j]) / 2);
      }
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < v.size(); i++) {
      mx = max(mx, (v[i] + v1[i]) / 2);
    }
    cout << mx << endl;
  }
}
int main() {
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
