N = int(eval(input()))

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

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



difer = [v - c for v, c in zip(V, C)]



ans = 0

for i in range(len(difer)):

    if difer[i] >= 0:

        ans += difer[i]



print(ans)

N = int(eval(input()))

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

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



ans = 0

for v, c in zip(V, C):

    if v-c >= 0:

        ans += (v-c)



print(ans)

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

N = int(eval(input()))
V = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = 0
for v, c in zip(V, C):
    if v - c >= 0:
        ans += v - c
print(ans)

-difer = [v - c for v, c in zip(V, C)] -for i in range(len(difer)): -    if difer[i] >= 0: -        ans += difer[i] +for v, c in zip(V, C): +    if v - c >= 0: +        ans += v - c