N = int(input()) X = list(map(int, input().split())) X.sort() for i in range(N - 1): X[-1] += X[i]//2 X[i] = 0 print(X[-1])