inputs = Array.new
while line = $stdin.gets
  inputs << line.chomp
end

N = inputs[0]
vs = inputs[1].split(" ").map(&:to_i)
cs = inputs[2].split(" ").map(&:to_i)

res = 0
[vs, cs].transpose.each do |v, c|
  val = v - c > 0 ? v - c : 0
  res = res + val
end

puts res
