import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()

N = I()
v = LI()

v = sorted(v,reverse=True)

ans = 0

for i in range(N-1):
    ans += v[i]/(2**(i+1))

print(ans + v[N-1]//(2**(N-1)))