#include <bits/stdc++.h>
using namespace std;
int main() {
  double m = 0;
  int n;
  cin >> n;
  double s = 0;
  double num[n];
  vector<double> d;
  for (int i = 0; i < n; i++) {
    cin >> num[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (num[i] != num[j]) {
        s = (num[i] + num[j]) / 2;
        d.push_back(s);
      }
    }
  }
  sort(unique(d.begin(), d.end()), d.end());
  if (d.size() > 2) {
    cout << (d[0] + d[1]) / 2 << endl;
  } else {
    cout << num[0] << endl;
  }
}
