#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
char S[101000], T[101000];
int n, m, f[3030][3030];
int main() {
  scanf("%s", S + 1);
  scanf("%s", T + 1);
  n = strlen(S + 1);
  m = strlen(T + 1);
  for (register int i = 1; i <= n; ++i) {
    if (i > m || S[1] == T[i]) f[i][i] = 2;
  }
  for (register int j = 1; j <= n; ++j) {
    for (register int i = j; i >= 1; --i) {
      int len = j - i + 1;
      if (i != 1) {
        if (i > m + 1 || S[len + 1] == T[i - 1])
          f[i - 1][j] += f[i][j], f[i - 1][j] %= mod;
      }
      if (j != n) {
        if (j >= m || S[len + 1] == T[j + 1])
          f[i][j + 1] += f[i][j], f[i][j + 1] %= mod;
      }
    }
  }
  int res = 0;
  for (register int i = m; i <= n; ++i) res += f[1][i], res %= mod;
  cout << res << "\n";
  return 0;
}
