#include <bits/stdc++.h>
char s[3333], t[3333];
long long dp[3333][3333], mod = 998244353;
long long dfs(int pos, int len) {
  if (1 == len) {
    if (t[pos] == '#' || t[pos] == s[len])
      return 2;
    else
      return 0;
  }
  if (dp[pos][len] != -1) return dp[pos][len];
  dp[pos][len] = 0;
  int r = pos + len - 1;
  if (t[r] == '#' || t[r] == s[len]) dp[pos][len] += dfs(pos, len - 1);
  if (t[pos] == '#' || t[pos] == s[len]) dp[pos][len] += dfs(pos + 1, len - 1);
  dp[pos][len] %= mod;
  return dp[pos][len];
}
int main() {
  scanf("%s", s + 1);
  scanf("%s", t + 1);
  int n = strlen(s + 1), m = strlen(t + 1);
  for (int i = m + 1; i <= n; ++i) t[i] = '#';
  memset(dp, -1, sizeof dp);
  long long ans = 0;
  for (int i = m; i <= n; ++i) {
    ans = (ans + dfs(1, i)) % mod;
  }
  printf("%lld", ans);
}
