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

result = 0
values.each_with_index do |value, i|
  result += value - costs[i] if value - costs[i] > 0
end

puts result