#!/usr/bin/env ruby

input = readlines
n = input[0].to_i
v = input[1].split(' ').map(&:to_i)
c = input[2].split(' ').map(&:to_i)

sum = 0
v.each_with_index do |v, i|
  sum += v - c[i] if v > c[i]
end
p sum