import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T
import qualified Data.Vector.Unboxed as VU
import Data.Bool (bool)

main :: IO ()
main = do
  let
    modulus = 998244353 :: Int
  [_, s] <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  let
    f :: [Int] -> Int
    f = VU.last . foldl step (VU.iterateN (succ s) (const 0) 1)
      where
        step :: VU.Vector Int -> Int -> VU.Vector Int
        step v x = VU.map (`mod` modulus) . (VU.zipWith (+) <$> VU.map (2 *) <*> (VU.replicate x 0 VU.++)) $ v
  as <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  print . f $ as

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
