n = gets.to_i
now = gets.split.map(&:to_i)
pass = gets.split.map(&:to_i)
ans = 0
sum = 0
check = 0
change = []
for i in 0..n-1
  if now[i] < pass[i]
    sum += pass[i] - now[i]
    ans += 1
  else
    check += now[i] - pass[i]
    change.push(now[i] - pass[i])
  end
end
change.sort!
if change.length == 0 || sum > check
  puts -1
  exit
end
while sum > 0
  sum -= change[-1]
  ans += 1
  change.delete_at(-1)
end
puts ans
