#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
using V = vector<T>;
const int INF = 1e9;
const long long mod = 1000000007;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
int main() {
  int n, v;
  cin >> n;
  vector<int> V;
  for (int i = 0; i < n; ++i) {
    cin >> v;
    V.push_back(v);
  }
  sort((V).begin(), (V).end(), greater<int>());
  double _res = 0;
  _res = (V[1] + V[2]) / 2.0;
  double res = 0;
  res = (_res + V[0]) / 2.0;
  if (V.size() == 2) {
    _res = (V[0] + V[1]) / 2.0;
    cout << _res << "\n";
  } else {
    cout << res << "\n";
  }
}
