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