import qualified Data.ByteString.Char8 as B
import Data.List
import Data.Maybe

main = do
    n  <- fst . fromJust . B.readInt <$> B.getLine
    as <- sort . map (fst . fromJust . B.readInt) . B.words <$> B.getLine

    let ls = scanl (+) 0 as

    -- print $ zip as ls    
    print . (\x -> n - x) .  maximum $ sim (zip as ls) 0

sim []     n = []
sim (_:[]) n = []
sim ((x,x'):(y,y'):l) n = if 2*(x+x') >= y
    then sim ((y,y'):l) (n+1)
    else n+1 : sim ((y,y'):l) (n+1)