#import <Foundation/Foundation.h>
typedef long long Int;
int compare(const void *a, const void *b){
	return *((Int*)b)-*((Int*)a);
}
int main() {
	int n;
	scanf("%d",&n);
	Int *v=(Int*)malloc(sizeof(Int)*n);
	for(int i=0;i<n;i++){
		scanf("%lld",v+i);
	}
	qsort(v, n, sizeof(Int), compare);
	long double ans=0;
	for(long i=0;i<n;i++){
		ans += ((long double)v[i])/(MIN(2LL<<i,1LL<<(n-1)));
	}
	printf("%.16Lf\n",ans);
}