import heapq
N = int(input())
v_ls = [int(i) for i in input().split()]
heapq.heapify(v_ls)
while len(v_ls) > 1:
    smallest = heapq.heappop(v_ls)
    second = heapq.heappop(v_ls)
    heapq.heappush(v_ls, (smallest + second) / 2)
print(int(heapq.heappop(v_ls)))