n=int(eval(input()))

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

print((int(sum(a)-max(a)/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()))
a = [int(eval(input())) for i in range(n)]
print((int(sum(a) - max(a) / 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())) -a = [int(eval(input())) for i in range(n)] -print((int(sum(a) - max(a) / 2))) +N = int(eval(input())) +L = [int(eval(input())) for i in range(N)] +print((sum(L) - int(max(L) / 2)))