import sys 
stdin = sys.stdin
 
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
v = na()
v.sort(reverse=False)
ans = v[0]

for vi in v[1:]:
        ans = (ans + vi) / 2

print(int(ans))