n = gets.to_i
v = gets.chomp.split.map(&:to_i)
c = gets.chomp.split.map(&:to_i)

length = n
number = 0
max = 0

while number <= length - 1 do
  if v[number] > c[number]
    max = max + (v[number] - c[number])
  end
  number += 1
end

puts max


