local n=io.read("n")
local a={}
for i=1,n do
    a[i]=io.read("n")
end
table.sort(a)

local suma={a[1]}
for i=2,n do
    suma[i]=suma[i-1]+a[i]
end

local counter=n
for i=1,n-1 do
    if a[i+1]>2*suma[i] then
        counter=counter-i
        break
    end
end
print(counter)