import Data.List (subsequences) import Data.Functor ((<$>)) main = do l <- read <$> getLine getLine show . foldl1 max . map length . filter ((l>=).sum) . subsequences . map read . words <$> getLine >>= putStrLn