N = gets.to_i
V = gets.split(' ').map(&:to_i)
C = gets.split(' ').map(&:to_i)
diff = []
sum = 0

N.times do |i|
  diff.push(V[i] - C[i])
end

diff = diff.sort.reverse

N.times do |i|
  break if diff[i] < 0
  sum += diff[i]
end

puts sum