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

diff = [v, c].transpose.map{|arr| arr[0] - arr[1]}

sum = 0
diff.each do |e|
  if e > 0
    sum += e
  end
end

puts sum