#include <bits/stdc++.h>
using namespace std;
const int N = 3000, MD = 998244353;
int dp[N][N];
int main() {
  string s, t;
  cin >> s >> t;
  int n = s.length(), m = t.length();
  for (int i = 0; i < n; i++)
    if (i >= m || s[0] == t[i]) dp[i][i] = 2;
  for (int i = n - 1; i >= 0; i--)
    for (int j = i; j < n; j++) {
      int x = dp[i][j];
      if (x == 0) continue;
      int h = j - i + 1;
      if (h == n) continue;
      char c = s[h];
      if (i > 0 && (i - 1 >= m || c == t[i - 1]))
        dp[i - 1][j] = (dp[i - 1][j] + x) % MD;
      if (j + 1 < n && (j + 1 >= m || c == t[j + 1]))
        dp[i][j + 1] = (dp[i][j + 1] + x) % MD;
    }
  int ans = 0;
  for (int j = m - 1; j <= n - 1; j++) ans = (ans + dp[0][j]) % MD;
  cout << ans << '\n';
  return 0;
}
