n = STDIN.gets.chomp.to_i
v = STDIN.gets.chomp.split(" ").map{|x| x.to_i}
c = STDIN.gets.chomp.split(" ").map{|x| x.to_i}

diff = []
for i in 0..(n-1) do
  diff[i] = v[i] - c[i]
end

diff.select!{|n| n > 0}
if diff.size == 0
  puts 0
  exit
end

puts diff.inject(:+)