#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
double calculateAverageDifference(const std::vector<int>& numbers) {
int size = numbers.size();
int half = size / 2;
double sum = 0;
for (int i = 0; i < half; i++) {
sum += numbers[size - 1 - i] - numbers[i];
}
if (size % 2 == 1) {
sum += numbers[half];
}
return sum / half;
}
int main() {
int m;
std::cin >> m;
std::vector<int> numbers(m);
for (int i = 0; i < m; i++) {
std::cin >> numbers[i];
}
std::sort(numbers.begin(), numbers.end());
double result = calculateAverageDifference(numbers);
std::cout << std::fixed << std::setprecision(1) << result << std::endl;
return 0;
}