n = gets.chomp!.to_i
v_n = gets.chomp!.split(" ").map!(&:to_i)
c_n = gets.chomp!.split(" ").map!(&:to_i)

cost_n = v_n.zip(c_n).map{|v, c| v - c }

puts cost_n.select{|cost| cost >= 0 }.inject(0) {|sum, x| sum += x }