import Data.List

main = interact $ show . sol . map read . words

sol :: [Int] -> Int
sol (_:s:as) = f s $ sort as

f s [] = if s==0 then 1 else 0
f s (a:as)
  | s == 0    = p2 $ length (a:as)
  | s < a     = 0
  | otherwise = (f (s-a) as + 2*f s as) `mod` p

p = 998244353 :: Int

p2 :: Int -> Int
p2 x
  | x == 0    = 1
  | odd x     = 2*r `mod` p
  | otherwise = r
  where
  q = p2 (x `div` 2)
  r = q*q `mod` p