N = gets.to_i
V = gets.split(" ").map(&:to_i)
C = gets.split(" ").map(&:to_i)
diff = []
ans = 0
for i in 0...N
  diff << V[i] - C[i]
end
diff.sort!.reverse!
for j in 0...N
  if diff[j] > 0 then ans += diff[j] else break end
end
puts ans