N = int(input())
V = sorted([int(x) for x in input().split()])

import heapq

heapq.heapify(V)

while len(V) >= 2:
    x = heapq.heappop(V)
    y = heapq.heappop(V)
    heapq.heappush(V, (x + y) // 2)

print(V[0])




