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

if as.inject(:+) < bs.inject(:+)
  puts -1
  exit
end

ans = 0
short = 0
amari = []
(0..n-1).each do |i|
  if as[i] < bs[i]
    ans += 1
    short += bs[i] - as[i]
  else
    amari << as[i] - bs[i]
  end
end

amari.sort!
while short > 0 do
  short -= amari.pop
  ans += 1
end

puts ans
