N = gets.to_i
V = gets.split(' ').map(&:to_i)
C = gets.split(' ').map(&:to_i)

val = (0..N-1).collect{|i| V[i] - C[i]}.sort.reverse
maxval = 0
cnt = 0
while val[cnt] > 0 and cnt < N
	maxval += val[cnt]
	cnt += 1
end

puts maxval