#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long dp[100][100][100];
int main(int argc, const char* argv[]) {
  int n, s;
  std::cin >> n >> s;
  int a[n];
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
  }
  long long cnt = 0;
  for (int i = 0; i < n; i++) {
    dp[i][i][0] = 1;
    if (a[i] <= s) {
      (dp[i][i][a[i]] += 1) %= mod;
    }
    (cnt += dp[i][i][s]) %= mod;
    for (int j = i + 1; j < n; j++) {
      for (int k = 0; k <= s; k++) {
        (dp[i][j][k] += dp[i][j - 1][k]) %= mod;
        if (k + a[j] <= s) {
          (dp[i][j][k + a[j]] += dp[i][j - 1][k]) %= mod;
        }
      }
      (cnt += dp[i][j][s]) %= mod;
    }
  }
  std::cout << cnt << std::endl;
  return 0;
}
