N = 10**6 mod = 998244353 fac = [1]*(N+1) finv = [1]*(N+1) for i in range(N): fac[i+1] = fac[i] * (i+1) % mod finv[-1] = pow(fac[-1], mod-2, mod) for i in reversed(range(N)): finv[i] = finv[i+1] * (i+1) % mod def cmb1(n, r, mod): if r <0 or r > n: return 0 r = min(r, n-r) return fac[n] * finv[r] * finv[n-r] % mod n, m = map(int, input().split()) A = list(map(int, input().split())) INF = 10**18 dp = [INF]*(m+1) # dp[i]: iをAの要素の重複を許す和で表すときの使う要素の最小値 dp[0] = 0 for i in range(m+1): for a in A: if i+a <= m: dp[i+a] = min(dp[i+a], dp[i]+1) #print(dp) ans = 0 for k in range(m+1): if dp[k] == INF: continue ans += cmb1(m-dp[k], k-dp[k], mod) ans %= mod print(ans)