n = int(input()) android_list = [ int(v) for v in input().split(" ") ] android_list = sorted(android_list) for i in range(n-1): android_list[n-1] += android_list[i] // 2 print(android_list[-1])