from sys import stdin
n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
while len(li) > 1:
    a = li[0] + li[1]
    li.pop(0)
    li.pop(0)
    b = a/2
    li.insert(0,b)
print(li[0])