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

main = do
 [n,k] <- map read . words <$> getLine
 as <- map (fst . fromJust . B.readInt) . B.words <$> B.getLine
 print (noNeed n k as)

noNeed n k as = length $ filter (\a -> all (\s -> sum s - a >= k) (filter (elem a) subsets)) as
 where subsets = filter ((>=k) . sum) (subsequences as)