params = STDIN.read
l1 = params.split(/\n/)[0].strip
l2 = params.split(/\n/)[1]
l3 = params.split(/\n/)[2]

n = l1.to_i
v_arr = l2.split(" ").map(&:to_i)
c_arr = l3.split(" ").map(&:to_i)

v_with_c = v_arr.zip c_arr

ans = 0
v_with_c.each do |jew|
  dif = jew[0] - jew[1]
  ans += dif if jew[0] - jew[1] > 0
end


puts ans
