n = gets.to_i
net_values = []

values = gets.split.map(&:to_i)
costs = gets.split.map(&:to_i)

(0...values.length).each do |i|
  if values[i] - costs[i] >= 0
  	net_values.push(values[i] - costs[i])
  end
end

if net_values.length != 0
  puts net_values.inject(:+)
else
  puts 0
end
