n,m = map(int,input().split()) a = list(map(int,input().split())) inf = 10 ** 5 + 1 dp = [inf] * (m+1) dp[0] = 0 while True: n_dp = [inf] * (m+1) flg = False for i in range(m+1): n_dp[i] = min(dp[i],n_dp[i]) for j in range(n): if dp[i] != inf: if a[j] + i <= m: if i <= m - j: if n_dp[i + a[j]] > dp[i] + 1: # print(i,j) n_dp[i + a[j]] = dp[i] + 1 flg = True if dp == n_dp: break dp = n_dp ans = 0 n = m fac_arr = [1] * (n+1) r_s_fac_arr = [1] * (n+1) mod = 998244353 for i in range(1,n+1): fac_arr[i] = (fac_arr[i-1] % mod) * i % mod r_s_fac_arr[i] = (r_s_fac_arr[i-1] % mod) * pow(i,mod-2,mod) % mod def nCk_Mod(n,k): return fac_arr[n] % mod * r_s_fac_arr[k] % mod * r_s_fac_arr[n-k] % mod ans = 0 for i in range(m+1): if dp[i] != inf: ans += nCk_Mod(m-dp[i],i-dp[i]) ans %= mod print(ans)