n = int(eval(input()))

nums =[]

for i in range(n):

    nums.append(int(eval(input())))



m = max(nums)

nums.remove(m)

print((int(sum(nums) + (m / 2))))

N = int(eval(input()))

nums = []

for i in range(N):

    nums.append(int(eval(input())))

m = max(nums)

nums.remove(m)

print((int(sum(nums) + (m / 2))))

n = int(eval(input()))
nums = []
for i in range(n):
    nums.append(int(eval(input())))
m = max(nums)
nums.remove(m)
print((int(sum(nums) + (m / 2))))

N = int(eval(input()))
nums = []
for i in range(N):
    nums.append(int(eval(input())))
m = max(nums)
nums.remove(m)
print((int(sum(nums) + (m / 2))))

-n = int(eval(input())) +N = int(eval(input())) -for i in range(n): +for i in range(N):