#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
const int N = 3005;
int dp[N][N];
int n, m;
string s, t;
long long go(int l, int r) {
  if (l > r) return 1;
  if (dp[l][r] != -1) return dp[l][r];
  long long cur = 0;
  if (l >= m or s[r - l] == t[l]) {
    cur = (cur + go(l + 1, r));
    if (cur >= MOD) cur -= MOD;
  }
  if (r >= m or s[r - l] == t[r]) {
    cur = (cur + go(l, r - 1));
    if (cur >= MOD) cur -= MOD;
  }
  return dp[l][r] = cur;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> s >> t;
  n = s.length();
  m = t.length();
  long long ans = 0;
  for (int i = m - 1; i < n; i++) {
    ans = (ans + go(0, i));
    if (ans >= MOD) ans -= MOD;
  }
  printf("%d\n", ans);
}
