num = gets.to_i

arr1 = gets.split.map(&:to_i) #入力が２つ以上の時
arr2 = gets.split.map(&:to_i) #入力が２つ以上の時

newarr = []

  num.times do |i|
	temp = arr1[i] - arr2[i]
    if temp > 0
	newarr << temp
	
    end
  end

if newarr == []
	puts 0
else
	puts newarr.sum
end