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