n=int(eval(input()))

v=[*list(map(int,input().split()))]

c=[*list(map(int,input().split()))]

print((sum(max(x-y,0) for x,y in zip(v,c))))
eval(input())

f=lambda:list(map(int,input().split()))

print((sum(max(x-y,0) for x,y in zip(f(),f()))))
n = int(eval(input()))
v = [*list(map(int, input().split()))]
c = [*list(map(int, input().split()))]
print((sum(max(x - y, 0) for x, y in zip(v, c))))

eval(input())
f = lambda: list(map(int, input().split()))
print((sum(max(x - y, 0) for x, y in zip(f(), f()))))

-n = int(eval(input())) -v = [*list(map(int, input().split()))] -c = [*list(map(int, input().split()))] -print((sum(max(x - y, 0) for x, y in zip(v, c)))) +eval(input()) +f = lambda: list(map(int, input().split())) +print((sum(max(x - y, 0) for x, y in zip(f(), f()))))