#import <Foundation/Foundation.h>
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("%d",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(2<<i,1<<(n-1)));
	}
	printf("%.16Lf\n",ans);
}