#include <bits/stdc++.h>
using namespace std;
set<double> s;
int main() {
  double n, in;
  double output;
  cin >> n;
  int total = n;
  while (n--) {
    cin >> in;
    s.insert(in);
  }
  if (total == 2) {
    auto it = s.begin();
    double p, q;
    p = *it;
    advance(it, 1);
    q = *it;
    output = (p + q) / 2;
    cout << output << endl;
  } else if (total > 2) {
    double a, b, c;
    auto itr = s.rbegin();
    c = *itr;
    advance(itr, 1);
    b = *itr;
    advance(itr, 1);
    a = *itr;
    output = (((a + b) / 2) + c) / 2;
    cout << output << endl;
  }
  return 0;
}
