n = gets.chomp.to_i

jewelrys = gets.chomp.split.map(&:to_i)
costs = gets.chomp.split.map(&:to_i)

profits = 0
for i in 0..(n-1) do
  temp = jewelrys[i] - costs[i]
  if temp > 0
    profits = profits + jewelrys[i] - costs[i]
  end
end

print("#{profits}\n")