n = int(input())
listV =  list(map(int,input().split()))
sortedListV = sorted(listV)

for i in range(0 , n-1):
    if (i > 0):
        result = (result + sortedListV[i]) // 2
    else:
        result = (sortedListV[i] + sortedListV[i+1]) // 2
print(result)