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|
  if v>a[i]
    s+=v-a[i]
    ans+=1
  else
    arr.push(a[i]-v)
  end
  i+=1
end
arr.sort.reverse
arr.each do |v|
  break if s<=0
  s-=v
  ans+=1
end
if s<=0
  puts ans
else
  puts -1
end