import Control.Applicative
import Data.List
import Data.Maybe

main = do
  [n,s] <- map read.words<$>getLine
  list <- map read.words<$>getLine
  print $ fromMaybe 0 $ solve s list

solve :: Int -> [Int] -> Maybe Int
solve s = minimum'.map length.filter (\x -> sum x >= s).concat.map inits.tails
 
minimum' [] = Nothing
minimum' xs = Just (minimum xs)