N = int(eval(input()))

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

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

a=[]

for i in range(0,N):

  if V[i]>=C[i]:

    a.append(V[i]-C[i])

  else:

    continue

print((sum(a)))
import heapq

N = int(eval(input())) 

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

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

a=[] 

for i in range(0,N): 

  if V[i]>=C[i]:

    heapq.heappush(a,(V[i]-C[i])) 

  else:

    continue 

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

import heapq

N = int(eval(input()))
V = list(map(int, input().split()))
C = list(map(int, input().split()))
a = []
for i in range(0, N):
    if V[i] >= C[i]:
        heapq.heappush(a, (V[i] - C[i]))
    else:
        continue
print((sum(a)))

+import heapq + -        a.append(V[i] - C[i]) +        heapq.heappush(a, (V[i] - C[i]))