def test
    n = gets.to_i
    vs = gets.split(" ").map(&:to_i)
    cs = gets.split(" ").map(&:to_i)
    ans = 0
    n.times do |i|
        tmp = vs[i] - cs[i]
        ans += tmp if tmp >= 0
    end
    ans
end

puts test