n = gets.to_i
arr = []
s = 0
ans = 0
a = gets.chomp.split(" ").map!(&:to_i)
b = gets.chomp.split(" ").map!(&:to_i)
i = 0
b.each do |v|
  t = v - a[i]
  if t > 0
    s += t
    ans += 1
  else
    arr.push(-t)
  end
  i += 1
end
arr.sort!.reverse!
arr.each do |v|
  break if s<=0
  s -= v
  ans += 1
end
puts s <= 0 ? ans : -1
