import Data.List
main=do
 [n,x]<-map read.words<$>getLine
 a<-sort.map read.words<$>getLine
 print(f x a)
  where f x [a] = if x==a then 1 else 0
        f x (c:a) = if x>=c then (1+(f (x-c) a)) else (f 0 a)