N = gets.split.map(&:to_i)
A_ARRAY = gets.split.map(&:to_i)
B_ARRAY = gets.split.map(&:to_i)

result = 0
gap = 0
yobis = []
A_ARRAY.zip(B_ARRAY).each do |ary|
  a = ary[0]
  b = ary[1]

  if b > a
    result += 1
    gap += b - a
  else
    yobis << a - b
  end
end

if result.zero?
	puts 0
	exit
end

yobis.sort!.reverse_each do |i|
  result += 1
  gap -= i

  if gap <= 0
    puts result
    exit
  end
end

puts -1
