#include <bits/stdc++.h>

#define ll long long

using namespace std;

const int N = 1e5 + 5;
const long double eps = 0.000000000000;

ll n, a[N], p[N];

int main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	
	cin >> n;
	for(int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	for(int i = 1; i <= n; i++) {
		p[i] = p[i - 1] + a[i];
	}
	
	long double ans = 1e18 + eps;
	
	ans = min(ans, accumulate(a + 1,a + n + 1, (long double) 0));
	
	cout << fixed << setprecision(20);
	
	for(int i = 0; i < n; i++) {
		long double x = (a[i + 1] + eps) / 2;
		ans = min(ans, x * n - p[i + 1] + p[n] - ((n - i - 1) * x * 2));
	}
	
	cout << (ans + eps) / n;
	
}
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define mydeb(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
//#define mydeb(fmt, ...) 

int main()
{
	int n;
	cin >> n;
	int x0,y0,xh,yh;
	cin >> x0 >> y0 >> xh >> yh;

	complex<double> p0(x0,y0);
	complex<double> ph(xh,yh);
	complex<double> pc=(p0+ph)/2.0;

	complex<double> r=polar(1.0,acos(-1)*2/n);
	complex<double> p1=(p0-pc)*r + pc;

	//mydeb("xc %f yc %f theta %f cosx %f cosy %f sinx %f siny %f\n",xc,yc,theta,cosx,cosy,sinx,siny);
	cout << setprecision(15) << p1.real() << " " << p1.imag() << endl;
}




