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