import qualified Data.ByteString.Char8 as BS
import Data.List

main = do
  [n, x] <- unfoldr (BS.readInt . BS.dropWhile (== ' ')) <$> BS.getLine
  as <- sort <$> unfoldr (BS.readInt . BS.dropWhile (== ' ')) <$> BS.getLine
  print $ solve x as

solve x [a] = if x == a then 1 else 0
solve x (a : as)
  | x == a = 1
  | x < a = 0
  | otherwise = 1 + solve (x - a) as