#include #define forn(i,s,t) for(register int i=(s); i<=(t); ++i) #define form(i,s,t) for(register int i=(s); i>=(t); --i) #define rep(i,s,t) for(register int i=(s); i<(t); ++i) using namespace std; const int N = 1e2 + 3, M = 1e5 + 3, Mod = 998244353; struct Mint { int res; Mint() {} Mint(int _r) : res(_r) {} inline friend Mint operator + (const Mint& A, const Mint& B) { return Mint((A.res + B.res) >= Mod ? A.res + B.res - Mod : A.res + B.res); } inline friend Mint operator - (const Mint& A, const Mint& B) {return A + Mint(Mod - B.res);} inline friend Mint operator * (const Mint& A, const Mint& B) {return Mint(1ll * A.res * B.res % Mod);} inline friend Mint& operator += (Mint& A, const Mint& B) {return A = A + B;} inline friend Mint& operator -= (Mint& A, const Mint& B) {return A = A - B;} inline friend Mint& operator *= (Mint& A, const Mint& B) {return A = A * B;} inline friend Mint q_pow(Mint p, int k = Mod - 2) { Mint res = Mint(1); for(; k; k >>= 1, p *= p) (k & 1) && (res *= p, 0); return res; } inline friend Mint operator ~ (Mint A) {return q_pow(A);} } ; Mint fac[M], ifac[M]; inline void table(int lim) { fac[0] = Mint(1); forn(i,1,lim) fac[i] = fac[i - 1] * Mint(i); ifac[lim] = ~fac[lim]; form(i,lim - 1,0) ifac[i] = ifac[i + 1] * Mint(i + 1); } inline Mint C(int n, int r) { if(n < 0 || r < 0 || n < r) return Mint(0); return fac[n] * ifac[r] * ifac[n - r]; } int n, m, a[N], f[M]; int main() { scanf("%d%d", &n, &m), table(m); forn(i,1,n) scanf("%d", a + i); memset(f, 0x3f, sizeof f); int inf = f[0]; f[0] = 0; forn(i,1,n) forn(j,a[i],m) f[j] = min(f[j], f[j - a[i]] + 1); Mint res = Mint(0); forn(i,0,m) res += C(m - f[i], i - f[i]); printf("%d\n", res.res); return 0; }