#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;

int n;
int a[100100];

int main(){
	ios::sync_with_stdio(false);
	cin >> n;
	rep(i, n)
		cin >> a[i];
	sort(a, a + n);
	double val = 0;
	rep(i, n)
		val += (double)a[i] - 0.5 * a[0];
	double ans = val;
	for(int i = 1; i < n; i++){
		val += (double)(a[i] - a[i - 1]) * i * 0.5;
		val -= (double)(a[i] - a[i - 1]) * (n - i) * 0.5;
		ans = min(ans, val);
	}
	cout << fixed << setprecision(12) << ans / n << endl;
	return 0;
}
#include <bits/stdc++.h>

using namespace std;

int main() {
    int a, b, c, minimum = 100;
    cin >> a;
    minimum = min(a, minimum);
    cin >> b;
    minimum = min(b, minimum);
    cin >> c;
    minimum = min(c, minimum);
    cout << a + b + c - minimum;
    return 0;
}