awk 'function sort(a,n){qsort(a,1,n)}\
function qsort(a,p,r){if(p<r){q=ptn(a,p,r);qsort(a,p,q-1);qsort(a,q+1,r)}}\
function ptn(a,p,r){x=a[r];i=p-1;for(j=p;j<r;j++){if(a[j]<=x){i++;t=a[i];a[i]=a[j];a[j]=t}}t=a[i+1];a[i+1]=a[r];a[r]=t;return i+1}\
BEGIN{\
	getline n\
	getline\
	for(i=1;i<=n;i++)a[i]=$i\
	sort(a,n)\
	for(i=2;i<=n;i++)a[1]=(a[1]+a[i])/2\
	print(a[1])\
}'