import Control.Applicative( (<$>))
import Data.Sequence( fromList, splitAt,
			ViewR( (:>)), viewr,
			ViewL( (:<), EmptyL), viewl,
			sort, (><))
import qualified Data.Sequence as Seq

main = do
    n_ <-  readLn::IO Int
    as_ <- map read . words <$> getLine :: IO [Int]
    let
	sortedAs = sort . fromList $ as_

	pick ix = let
			(left,right) = Seq.splitAt ix sortedAs
			left':>picked = viewr left
		in
		    (picked, left'><right)

	challenge:: Int->Int->Int
	challenge 0 success = success
	challenge i success = let
		    (c, sq) = pick (n_-i+1)
		in
		    if try c (viewl sq)
			then challenge (i-1) (success+1)
			else challenge (i-1) success
	  where
	    try::Int->ViewL Int->Bool
	    try challenger EmptyL   = True
	    try challenger (h:<rem)
	      | challenger*2 >= h   = try (challenger+h) (viewl rem)
	      | otherwise	    = False
					
    print $ challenge n_ 0