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

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words

getIntList = readIntList <$> BS.getLine

createWeight :: [Int] -> Array Int -> [Int]
createWeight [] as = []
createWeight (s:ss) as = as ! s : createWeight ss as

calc :: [[Int]] -> Array Int -> Int -> Int
calc [] as s = 0
calc (ss:sss) as s = k + calc sss as s
  where
    weights = createWeight ss as
    k = length (filter (==s) (map sum (powerset weights)))

main = do
  [n, s] <- getIntList
  as <- getIntList
  let as' = listArray (1, length as) as
  let sss = init (powerset [1..n])
  print $ (calc sss as s) `mod` 998244353
                                   
