import Control.Applicative
import Data.List
import qualified Data.ByteString.Char8 as BS
import Data.Maybe

readIntBS = fst . fromJust . BS.readInt

main = do
  n <- getLine
  as <- sort . map read . words <$> getLine :: IO [Int]
  let bs = scanl (+) 0 as

  print $ (last . cut . map (\(a,b) -> a > b*2)) (zip as bs)

  where
    cut [] = []
    cut (True:xs) = (length a + 1) : cut b
      where (a,b) = span (not . id) xs
  
