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