N,M=map(int, input().split()) A=list(map(int, input().split())) A=sorted(A) dp=[10**10]*(M+1) dp[0]=0 for i in range(M): for a in A: if i+a<=M: dp[i+a]=min(dp[i]+1,dp[i+a]) mod=998244353 n=10**6 inv_t=[0]+[1] for i in range(2,n): inv_t+=[inv_t[mod%i]*(mod-int(mod/i))%mod] kai=[1,1] rev_kai=[1,inv_t[1]] for i in range(2,n): kai.append(kai[-1]*i%mod) rev_kai.append(rev_kai[-1]*inv_t[i]%mod) def cmb(n,r): return kai[n]*rev_kai[r]*rev_kai[n-r]%mod ans=0 for i in range(M+1): if dp[i]!=10**10: ans+=cmb(M-dp[i],M-i) ans%=mod print(ans)