N = int(eval(input()))

L = []

for i in range(N) :

    l = int(eval(input()))

    L.append(l)

L = sorted(L)

L[-1] //= 2

print((sum(L)))

N = int(eval(input()))

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

ans = sum(L[:-1])+L[-1]//2

print(ans)

N = int(eval(input()))
L = []
for i in range(N):
    l = int(eval(input()))
    L.append(l)
L = sorted(L)
L[-1] //= 2
print((sum(L)))

N = int(eval(input()))
L = sorted([int(eval(input())) for i in range(N)])
ans = sum(L[:-1]) + L[-1] // 2
print(ans)

-L = [] -for i in range(N): -    l = int(eval(input())) -    L.append(l) -L = sorted(L) -L[-1] //= 2 -print((sum(L))) +L = sorted([int(eval(input())) for i in range(N)]) +ans = sum(L[:-1]) + L[-1] // 2 +print(ans)