N = (gets).to_i
Vs = (gets).split(" ").map { |i| i.to_i }
costs = (gets).split(" ").map.with_index { |i,idx|
    t = Vs[idx] - i.to_i
    if t > 0 then
        t
    else
        0
    end
  }

total = 0
costs.each { |c| total = total + c }

puts total