import itertools

import math

import fractions

import functools

import copy

n = int(eval(input()))

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

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



sum = 0

for i in range(n):

    if v[i] > c[i]:

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

print(sum)
import math





def main():

    n = int(eval(input()))

    # a, b, t = map(int, input().split())

    # h = list(map(int, input().split()))

    # s = input()

    # h = [int(input()) for _ in rane(n)]



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

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



    sub = [v[i]-c[i] for i in range(n)]



    ans = 0

    for num in sub:

        if num >0:

            ans +=num



    print(ans)













if __name__ == '__main__':

    main()

import itertools
import math
import fractions
import functools
import copy

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

import math


def main():
    n = int(eval(input()))
    # a, b, t = map(int, input().split())
    # h = list(map(int, input().split()))
    # s = input()
    # h = [int(input()) for _ in rane(n)]
    v = list(map(int, input().split()))
    c = list(map(int, input().split()))
    sub = [v[i] - c[i] for i in range(n)]
    ans = 0
    for num in sub:
        if num > 0:
            ans += num
    print(ans)


if __name__ == "__main__":
    main()

-import itertools -import fractions -import functools -import copy -n = int(eval(input())) -v = list(map(int, input().split())) -c = list(map(int, input().split())) -sum = 0 -for i in range(n): -    if v[i] > c[i]: -        sum += v[i] - c[i] -print(sum) + +def main(): +    n = int(eval(input())) +    # a, b, t = map(int, input().split()) +    # h = list(map(int, input().split())) +    # s = input() +    # h = [int(input()) for _ in rane(n)] +    v = list(map(int, input().split())) +    c = list(map(int, input().split())) +    sub = [v[i] - c[i] for i in range(n)] +    ans = 0 +    for num in sub: +        if num > 0: +            ans += num +    print(ans) + + +if __name__ == "__main__": +    main()