#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<long long>;
using vvi = vector<vi>;
using P = pair<long long, long long>;
constexpr long long MOD = 1e9 + 7;
constexpr long long INF = 1LL << 60;
const long long dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
template <class T = long long>
bool chmin(T& a, T b) {
  bool f = a > b;
  a = f ? b : a;
  return f;
}
template <class T = long long>
bool chmax(T& a, T b) {
  bool f = a < b;
  a = f ? b : a;
  return f;
}
template <class T>
istream& operator>>(istream& is, vector<T>& st) {
  for (size_t i = 0; i < st.size(); ++i) is >> st[i];
  return is;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& st) {
  for (size_t i = 0; i < st.size(); ++i) {
    if (i == st.size() - 1)
      os << st[i];
    else
      os << st[i] << " ";
  }
  return os;
}
template <class T>
istream& operator>>(istream& is, vector<vector<T>>& st) {
  for (size_t i = 0; i < st.size(); ++i) is >> st[i];
  return is;
}
template <class T>
ostream& operator<<(ostream& os, const vector<vector<T>>& st) {
  for (size_t i = 0; i < st.size(); ++i) {
    os << st[i];
    if (i != st.size() - 1) os << endl;
  }
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& s, const pair<T1, T2>& p) {
  return s << "(" << p.first << ", " << p.second << ")";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long N;
  cin >> N;
  vi v(N);
  cin >> v;
  sort((v).begin(), (v).end());
  double ans = 0;
  for (long long i = (0); i < ((N - 1)); ++i) {
    ans += (v[i] + v[i + 1]) / 2.0;
  }
  cout << fixed << setprecision(7) << ans << endl;
}
