n=gets.chomp.to_i;
a=gets.chomp.split(" ").map(&:to_i);
b=gets.chomp.split(" ").map(&:to_i);

sum_a = 0
sum_b = 0
for i in 0..n-1
  sum_a = sum_a + a[i]
  sum_b = sum_b + b[i]
end

if sum_a < sum_b
  p -1
else
  count = 0
  odds = 0
  list = []
  for i in 0..n-1
    if a[i] < b[i]
      count = count + 1
      odds = odds + (b[i]-a[i])
    else
      list.push(a[i]-b[i])
    end
  end
  if count == 0
    p 0
  else
    list = list.sort.reverse
    len = list.length
    sum = 0
    i = 0
    while sum < odds && i < len
      sum = sum + list[i]
      count = count + 1
      i = i+1
    end
    p count
  end
end