N = int(eval(input()))

max_item = 0

sum_item = 0

i = 0



while N > i:                  

    c = int(eval(input()))                

    sum_item += c                   

    max_item = max(c, max_item)     

    i += 1



sum_item -= max_item // 2           

print(sum_item)
N = int(eval(input()))

pi = [int(eval(input())) for _ in range(N)]

print((sum(pi) - max(pi)//2))
N = int(eval(input()))
max_item = 0
sum_item = 0
i = 0
while N > i:
    c = int(eval(input()))
    sum_item += c
    max_item = max(c, max_item)
    i += 1
sum_item -= max_item // 2
print(sum_item)

N = int(eval(input()))
pi = [int(eval(input())) for _ in range(N)]
print((sum(pi) - max(pi) // 2))

-max_item = 0 -sum_item = 0 -i = 0 -while N > i: -    c = int(eval(input())) -    sum_item += c -    max_item = max(c, max_item) -    i += 1 -sum_item -= max_item // 2 -print(sum_item) +pi = [int(eval(input())) for _ in range(N)] +print((sum(pi) - max(pi) // 2))