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

d = (0...n).map { |i| b[i] - a[i] }.sort
temp = d.select { |i| i > 0 }
m = temp.count
if m == 0
  puts(0)
else
  s = temp.inject(&:+)
  0.upto(n - 1) do |i|
    if d[i] >= 0
      break
    else
      s += d[i]
      m += 1
    end
    break if s <= 0
  end
  puts(s <= 0 ? m : -1)
end
