#!/usr/bin/env ruby

n = STDIN.gets.chomp.to_i
values = STDIN.gets.chomp.split(' ').map &:to_i
costs  = STDIN.gets.chomp.split(' ').map &:to_i

ans = 0
(0..(n-1)).each do |i|
  income = values[i] - costs[i]
  if income > 0
    ans += income
  end
end

puts ans
