#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max = 2210, Maxp = 5605, MOD = 998244353;
int n, p, c[Max];
ll dp[Max][Maxp];

int main(){
	freopen("subsubset.inp", "r", stdin);
	freopen("subsubset.out", "w", stdout);
	cin >> n >> p;
	for (int i=1; i<=n; i++) cin >> c[i];
	dp[0][0] = 1;
	ll ans = 0;
	for (int i=1; i<=n; i++) for (int j=0; j<=p; j++) {
		dp[i][j] = (dp[i-1][j]+dp[i-1][j-c[i]])%MOD;
		ans = (ans+dp[i][j])%MOD;
	}

	cout << ans << endl;
	return 0;
}