n = int(eval(input()))

v = list(map(int, input().split()))

c = list(map(int, input().split()))

result = 0

for i in range(n):

  if v[i] > c[i]:

    result += v[i] - c[i]

print(result)
N = int(eval(input()))

V = list(map(int, input().split()))

C = list(map(int, input().split()))

print((sum([V[i] - C[i] for i in range(N) if V[i] > C[i]])))

n = int(eval(input()))
v = list(map(int, input().split()))
c = list(map(int, input().split()))
result = 0
for i in range(n):
    if v[i] > c[i]:
        result += v[i] - c[i]
print(result)

N = int(eval(input()))
V = list(map(int, input().split()))
C = list(map(int, input().split()))
print((sum([V[i] - C[i] for i in range(N) if V[i] > C[i]])))

-n = int(eval(input())) -v = list(map(int, input().split())) -c = list(map(int, input().split())) -result = 0 -for i in range(n): -    if v[i] > c[i]: -        result += v[i] - c[i] -print(result) +N = int(eval(input())) +V = list(map(int, input().split())) +C = list(map(int, input().split())) +print((sum([V[i] - C[i] for i in range(N) if V[i] > C[i]])))