n = gets.to_i
a = gets.split.map(&:to_i)
b = gets.split.map(&:to_i)

diff = []
cnt = 0
diff_sum = 0
n.times do |i|
  d = a[i]-b[i]
  diff[i] = d
  if d < 0
    cnt += 1
    diff_sum -= d
  end
end

if cnt == 0
  puts cnt
else
  ans = cnt
  diff.sort!.reverse!
  i = 0
  while diff_sum > 0
    if diff[i] < 0
      puts -1
      exit
    end
    diff_sum -= diff[i]
    ans += 1
    i += 1
  end
  puts ans
end