#include<bits/stdc++.h>
using namespace std;
const int N=1E5+5;
int n;
double a[N],r,ans,p=1E-7;
double f(double x){
	double s=0;
	for(int i=1;i<=n;i++){
		s=s+min(a[i],2*x);
	}
	return s-x*n;
}
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%lf",&a[i]),ans+=a[i],r=max(r,a[i]);
	r/=2.0;
	double l=0;
	while(l+p<r){
		double lmid=l+(r-l)/3;
		double rmid=r-(r-l)/3;
		if(f(lmid)>f(rmid)){r=rmid;}
		else{l=lmid;}
	}
	printf("%.7lf",(ans-f(l))/(n*1.0));
}
#include <bits/stdc++.h>

using namespace std;
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REPR(i,n) for(int i=(n)-1;i>=0;i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase( unique(ALL(v)) , v.end());

typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vi> vvi;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 29);
const ll LINF = 1e18;
const double PI = acos(-1);

template<typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }

template<typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T& t, const V& v) { t = v; }

template<typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T& t, const V& v) {
	for (auto& e : t) fill_v(e, v);
}
template<class T> bool chmax(T& a, const T& b) {
	if (a < b) { a = b; return 1; }
	return 0;
}
template<class T> bool chmin(T& a, const T& b) {
	if (a > b) { a = b; return 1; }
	return 0;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	cin >> N;
	vector<double> A(N);
	REP(i, N)cin >> A[i];
	so(A);
	double X = A[N / 2] / 2.0;
	double ans = 0;
	REP(i, N) {
		ans += X + max(0.0, A[i] - 2 * X);
	}
	ans /= N;
	printf("%.10f\n", ans);
	return 0;
}