import numpy as np



mod = 998244353

n, s = list(map(int, input().split()))

dp = np.zeros((n+1, s+1), dtype=int)

dp[0, 0] = 1

for i, a in enumerate(map(int, input().split())):

  dp[i+1] = dp[i] * 2 % mod

  dp[i+1][a:] = (dp[i+1][a:] + dp[i][:-a]) % mod

print((dp[-1, -1]))
import numpy as np



mod = 998244353

n, s = list(map(int, input().split()))

dp = np.zeros(s+1, dtype=int)

dp[0] = 1

for a in map(int, input().split()):

  pre_dp = dp

  dp = pre_dp * 2 % mod

  dp[a:] = (dp[a:] + pre_dp[:-a]) % mod

print((dp[-1]))
import numpy as np

mod = 998244353
n, s = list(map(int, input().split()))
dp = np.zeros((n + 1, s + 1), dtype=int)
dp[0, 0] = 1
for i, a in enumerate(map(int, input().split())):
    dp[i + 1] = dp[i] * 2 % mod
    dp[i + 1][a:] = (dp[i + 1][a:] + dp[i][:-a]) % mod
print((dp[-1, -1]))

import numpy as np

mod = 998244353
n, s = list(map(int, input().split()))
dp = np.zeros(s + 1, dtype=int)
dp[0] = 1
for a in map(int, input().split()):
    pre_dp = dp
    dp = pre_dp * 2 % mod
    dp[a:] = (dp[a:] + pre_dp[:-a]) % mod
print((dp[-1]))

-dp = np.zeros((n + 1, s + 1), dtype=int) -dp[0, 0] = 1 -for i, a in enumerate(map(int, input().split())): -    dp[i + 1] = dp[i] * 2 % mod -    dp[i + 1][a:] = (dp[i + 1][a:] + dp[i][:-a]) % mod -print((dp[-1, -1])) +dp = np.zeros(s + 1, dtype=int) +dp[0] = 1 +for a in map(int, input().split()): +    pre_dp = dp +    dp = pre_dp * 2 % mod +    dp[a:] = (dp[a:] + pre_dp[:-a]) % mod +print((dp[-1]))