N,M = map(int,input().split()) lsA = list(map(int,input().split())) mod = 998244353 INF = float('INF') dp = [INF]*(M+1) dp[0] = 0 class NCK: ''' 最大値 :N mod ''' def __init__(self,N,mod): self.mod = mod self.N = N self.factmod = [1,1] for i in range(2,self.N+1): self.factmod.append((self.factmod[-1]*i)%self.mod) self.inv = [0,1] for i in range(2, N + 1): self.inv.append((-self.inv[self.mod % i] * (self.mod // i)) % self.mod) self.invfact = [1,1] for i in range(2, N + 1): self.invfact.append((self.invfact[-1]*self.inv[i])%self.mod) def nCk(self,a,b): if a < b: return 0 return ((self.factmod[a]*self.invfact[b]%self.mod)*self.invfact[a-b])%self.mod def invnCk(self,a,b): return ((self.factmod[a-b]*self.invfact[a]%self.mod)*self.factmod[b])%self.mod nck = NCK(M+1,mod) lsA.sort() for i in range(N): for j in range(M): if j + lsA[i] <= M: dp[j + lsA[i]] = min(dp[j + lsA[i]],dp[j]+1) ans = 0 for i in range(M+1): if dp[i] == INF: continue ans += nck.nCk(M-dp[i],i-dp[i]) ans %= mod print(ans)