#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, a;
  double sum = 0;
  vector<double> v;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a;
    v.emplace_back(a);
  }
  for (int i = 0; i < N - 1; i++) {
    sort(v.begin(), v.end());
    double sa;
    if (v[1] - v[0] < v[v.size() - 1] - v[v.size() - 2]) {
      sa = (double)(v[1] + v[0]) / (double)2;
      v.erase(v.begin());
      v.erase(v.begin());
      v.push_back(sa);
    } else {
      sa = (double)(v[v.size() - 1] + v[v.size() - 2]) / (double)2;
      v.pop_back();
      v.pop_back();
      v.push_back(sa);
    }
  }
  cout << v[0] << endl;
  return 0;
}
