import sys input = sys.stdin.readline from collections import deque N,M=map(int,input().split()) A=list(map(int,input().split())) mod=998244353 DP=[-1]*(M+1) DP[M]=0 Q=deque([(0,M)]) while Q: x,y=Q.popleft() for i in A[:y]: if y-i>=0 and DP[y-i]==-1: DP[y-i]=x+1 Q.append((x+1,y-i)) FACT=[1] for i in range(1,2*10**5+1): FACT.append(FACT[-1]*i%mod) FACT_INV=[pow(FACT[-1],mod-2,mod)] for i in range(2*10**5,0,-1): FACT_INV.append(FACT_INV[-1]*i%mod) FACT_INV.reverse() def Combi(a,b): if 0<=b<=a: return FACT[a]*FACT_INV[b]%mod*FACT_INV[a-b]%mod else: return 0 ANS=1 for i in range(1,M+1): x=DP[i] if x==-1: continue #print(M-x,i-x) ANS+=Combi(M-x,i) ANS%=mod print(ANS)