N=int(eval(input()))

P=[int(eval(input())) for i in range(N)]

print((round(sum(P)-1/2*max(P))))
n=int(eval(input()))

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

print((sum(A)-max(A)//2))
N = int(eval(input()))
P = [int(eval(input())) for i in range(N)]
print((round(sum(P) - 1 / 2 * max(P))))

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

-N = int(eval(input())) -P = [int(eval(input())) for i in range(N)] -print((round(sum(P) - 1 / 2 * max(P)))) +n = int(eval(input())) +A = [int(eval(input())) for i in range(n)] +print((sum(A) - max(A) // 2))