#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (int)(n); i++) cin >> v.at(i);
  double ans = 0;
  sort(v.begin(), v.end());
  ans = (v.at(0) + v.at(1)) / 2;
  ans = (ans + v.at(n - 1)) / 2;
  cout << ans;
}
