n=gets.to_i
vrray=gets.split.map(&:to_i)
grray=gets.split.map(&:to_i)
array=[]
i=0
while i<n
  array.push(vrray[i]-grray[i])
  i+=1
end
brray = array.select{|x| x>0 }
if brray == []
  puts 0
else
  puts brray.inject(:+)
end