from functools import reduce

from operator import add

n=int(eval(input()))

v=[int(i) for i in input().split()]

c=[int(i) for i in input().split()]

l=[v[i]-c[i] for i in range(n) if v[i]>c[i]]

print((reduce(add,l) if l else 0))
n=int(eval(input()))

v=[int(i) for i in input().split()]

c=[int(i) for i in input().split()]

sum=0

for i in range(n):

  if v[i]>c[i]:

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

print(sum)
from functools import reduce
from operator import add

n = int(eval(input()))
v = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
l = [v[i] - c[i] for i in range(n) if v[i] > c[i]]
print((reduce(add, l) if l else 0))

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

-from functools import reduce -from operator import add - -l = [v[i] - c[i] for i in range(n) if v[i] > c[i]] -print((reduce(add, l) if l else 0)) +sum = 0 +for i in range(n): +    if v[i] > c[i]: +        sum += v[i] - c[i] +print(sum)