n=STDIN.gets.to_i
vs = STDIN.gets.split(' ').map(&:to_i)
cs = STDIN.gets.split(' ').map(&:to_i)
cost = 0
vs.each_with_index do |v, i|
    rv = vs[i] - cs[i]
    if rv > 0
      cost += rv
    end
end
puts cost