#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int64_t M = 998244353;
int64_t dp[3030][3030];
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  cin >> s >> t;
  int64_t n = s.size(), m = t.size();
  for (int64_t i = m; i <= n; i++) {
    if (i > m || s[i - 1] == t[m - 1]) {
      dp[i][0] = 1;
    }
    if (s[i - 1] == t[0]) {
      dp[i][0] = 1;
    }
  }
  for (int64_t i = n; i > 0; i--) {
    for (int64_t j = 0; j <= n - i; j++) {
      if (j >= m || s[i - 1] == t[j])
        dp[i - 1][j + 1] = (dp[i - 1][j + 1] + dp[i][j]) % M;
      if (i + j > m || s[i - 1] == t[i + j - 1])
        dp[i - 1][j] = (dp[i - 1][j] + dp[i][j]) % M;
    }
  }
  int64_t ans = 0;
  for (int64_t i = 0; i <= n; i++) ans = (ans + dp[0][i]) % M;
  cout << ans;
}
