n=gets.to_i
values=gets.chomp.split.map(&:to_i)
costs=gets.chomp.split.map(&:to_i)
maxs = []
values.each_with_index do |val, idx|
  profit=val-costs[idx]
  maxs<<profit if profit>=1
end

puts maxs.sum