N = int(input()) L = [int(l) for l in input().split()] L.sort() for i in range(N-1): L[-1] += L[i]//2 print(L[-1])