DBG = true
n = gets.to_i
a = gets.split.map{|x| x.to_i}
b = gets.split.map{|x| x.to_i}

sa = a.inject(:+)
sb = b.inject(:+)
if sa < sb
  print -1
  exit
end

fusoku = 0
nfusoku = 0
amari = []
for i in 0...n
  dif = b[i] - a[i]
  if dif > 0
    fusoku += dif
    nfusoku += 1
  elsif dif < 0
    amari << -dif
  end
end

if nfusoku == 0
  print 0
  exit
end

amari.sort_by!{ |x| -x }
namari = 0
sum = 0
for i in 0...amari.size
  sum += amari[i]
  namari += 1
  if sum >= fusoku
    print namari + nfusoku
    exit
  end
end
