n=int(eval(input()))

l=[int(eval(input())) for i in range(n)]

print((sum(l)-int(max(l)/2)))
n=int(eval(input()))

p=[int(eval(input())) for i in range(n)]



print((sum(p)-max(p)//2))
n = int(eval(input()))
l = [int(eval(input())) for i in range(n)]
print((sum(l) - int(max(l) / 2)))

n = int(eval(input()))
p = [int(eval(input())) for i in range(n)]
print((sum(p) - max(p) // 2))

-l = [int(eval(input())) for i in range(n)] -print((sum(l) - int(max(l) / 2))) +p = [int(eval(input())) for i in range(n)] +print((sum(p) - max(p) // 2))