#include <bits/stdc++.h>
using namespace std;
const int mxn = 5e5 + 5;
const int inf = 0x3f3f3f3f;
const long long mod = 9982443553;
int n, m;
long long dp[mxn], v[mxn];
int main() {
  int T;
  int ans = 0;
  memset(dp, 0, sizeof(dp));
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%lld", &v[i]);
  for (int i = 1; i <= n; i++) {
    dp[0]++;
    for (int j = m; j >= v[i]; j--) {
      dp[j] = (dp[j] + dp[j - v[i]]) % mod;
    }
    ans = (ans + dp[m]) % mod;
  }
  printf("%lld", ans);
  return 0;
}
