N= gets.to_i
as = gets.split.map(&:to_i)
bs = gets.split.map(&:to_i)

arr = []
rest = 0
ret = 0

i = 0
while i < N
  if as[i] < bs[i]
    rest += bs[i] - as[i]
    ret += 1
  else
    arr << as[i] - bs[i]
  end
  i += 1
end

arr.sort_by!{|a|-a}

arr.each do |a|
  if rest <= 0
    break
  end
  rest -= a
  ret += 1
end

if 0 < rest
  p -1
else
  p ret
end
