N,M = map(int,input().split()) A = list(map(int,input().split())) A.sort() MOD = 998244353 fact = [1] * (M+1) factr = [1] * (M+1) for i in range(2,M+1): fact[i] = (i * fact[i-1])%MOD factr[i] = (factr[i-1] * pow(i,MOD-2,MOD))%MOD INF = 10 ** 6 dp=[INF] * (M+1) dp[0] = 0 kset = {0} kset2 = set() i = 1 while kset: for k in kset: for a in A: k2 = k + a if k2 <= M: dp[k2] = min(i,dp[k2]) kset2.add(k2) else: break kset,kset2 = kset2,kset kset2 = set() i += 1 ans = 0 for i in range(M+1): if dp[i] != INF: M2 = M - dp[i] ans += fact[M2] * factr[M2 - i + dp[i]] * factr[i - dp[i]] ans %= MOD print(ans)