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

asum = as.sum
bsum = bs.sum

if asum < bsum
  puts -1
  exit
end

pos = []
neg = 0
cnt = 0
as.zip(bs) do |(a, b)|
  c = a - b
  if c < 0
   	neg += c
    cnt += 1
  elsif c > 0
    pos << c
  end
end

pos = pos.sort.reverse

while neg < 0
  neg += pos.shift
  cnt += 1
end

p cnt