N = gets.to_i
A = gets.split.map &:to_i
B = gets.split.map &:to_i

diffs = A.zip(B).collect{|a, b| a - b }

ans = -1

minus = diffs.select{|n| n < 0}
S_minus = -minus.inject(0, :+)
#puts "S_minus: #{S_minus}"

plus = diffs.select{|n| n > 0}.sort_by{|n| -n}
#puts "plus: #{plus.to_s}"

if plus.inject(0, :+) - S_minus >= 0 then
	ans = minus.size
	
	plus_sum = 0
	i = 0
	while plus_sum <S_minus do
		#puts "plus_sum: #{plus_sum} < S_minus: #{S_minus}"
		plus_sum += plus[i]
		i += 1
	end

	ans += i
end

puts ans
