local n = io.read("*n")
local a = {}
for i = 1, n do a[i] = io.read("*n") end
local sum = 0
for i = 1, n do
  a[i] = a[i] - io.read("*n")
  sum = sum + a[i]
end
if(sum < 0) then
  print(-1)
else
  table.sort(a)
  local task = 0
  local cnt = 0
  for i = 1, n do
    if(a[i] < 0) then
      task = task + a[i]
      cnt = cnt + 1
    else
      break
    end
  end
  for i = n, 1, -1 do
    if(0 <= task) then break end
    cnt = cnt + 1
    task = task + a[i]
  end
  print(cnt)
end
