n = gets.to_i
a = gets.split.map(&:to_i)
b = gets.split.map(&:to_i)
ex = []
lack = 0
ans = 0
n.times do |i|
  t = a[i] - b[i]
  ex << t if t > 0
  if t < 0
    lack += -t 
    ans += 1
  end
end
ex.sort!.reverse!
ex.each do |v|
  if lack > 0
    lack -= v
    ans += 1
  end
end
p lack <= 0 ? ans : -1
