import Data.List

main = do
    [_,k] <- getInts
    as <- getInts
    print $ solve k as

solve :: Int -> [Int] -> Int
solve k as = foldl (worker k gs) 0 as
    where
        gs = filter (\xs -> sum xs >= k) $ subsequences as

worker :: Int -> [[Int]] -> Int -> Int -> Int
worker k gs acc a = if unneed gs a then acc + 1 else acc
    where
        unneed gs a = let gs' = filter (\g -> a `elem` g) gs
                      in and $ map (\g -> sum g - a >= k) gs'

getInts :: IO [Int]
getInts = map read . words <$> getLine
