#include <bits/stdc++.h>
using namespace std;
struct hash_splitmix64 {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
template <typename Key, typename Value>
using u_map = std::unordered_map<Key, Value, hash_splitmix64>;
template <typename Key>
using u_set = std::unordered_set<Key, hash_splitmix64>;
template <class T>
T mod(T a, T b) {
  return (a % b + b) % b;
};
template <class T>
T gcd(T a, T b) {
  return b ? gcd<T>(b, a % b) : a;
};
template <class T>
T lcm(T a, T b) {
  return a * b / gcd<T>(a, b);
};
template <class T>
T max(T a, T b) {
  return a > b ? a : b;
};
template <class T>
T min(T a, T b) {
  return a < b ? a : b;
};
template <class T>
T maxans(T a, T b) {
  return a == -1 ? b : (a > b ? a : b);
};
template <class T>
T minans(T a, T b) {
  return a == -1 ? b : (a < b ? a : b);
};
long long int sq(int x) { return 1ll * x * x; }
int plusmod(int a, int b, int m) { return (1ll * a + b) % m; };
int minusmod(int a, int b, int m) { return mod((int)(1ll * a - b), m); };
int multmod(int a, int b, int m) { return (1ll * a * b) % m; };
int powmod(int a, int b, int m) {
  int ans = 1;
  a = mod(a, m);
  while (b > 0) {
    if (b & 1) ans = multmod(ans, a, m);
    b >>= 1;
    a = multmod(a, a, m);
  }
  return ans;
};
int invmod(int a, int m) { return powmod(a, m - 2, m); };
int divmod(int a, int b, int m) { return a; };
template <class T>
size_t upb(vector<T>& arr, T v, size_t beg = 0,
           size_t end = numeric_limits<size_t>::max()) {
  size_t p = (beg + end) / 2;
  if (arr[beg] > v || beg >= end) return beg;
  while (beg + 1 < end) {
    if (arr[p] > v)
      end = p;
    else
      beg = p;
    p = (beg + end) / 2;
  }
  return end;
}
template <class T>
size_t lwb(vector<T>& arr, T v, size_t beg = 0,
           size_t end = numeric_limits<size_t>::max()) {
  size_t p = (beg + end) / 2;
  if (arr[beg] >= v || beg >= end) return beg;
  while (beg + 1 < end) {
    if (arr[p] >= v)
      end = p;
    else
      beg = p;
    p = (beg + end) / 2;
  }
  return end;
}
int main() {
  int T, n, m, size = 3001, MOD = 998244353;
  vector<int> dp(size, 0);
  T = 1;
  for (int tt = 1; tt <= T; tt++) {
    string s, t;
    cin >> s >> t;
    n = s.size();
    m = t.size();
    int ans = 0;
    for (int i = 0; i <= n; i++) dp[i] = 1;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (j + i < m && s[i] != t[j + i]) dp[j] = 0;
        if (j >= m || s[i] == t[j]) dp[j] = plusmod(dp[j], dp[j + 1], MOD);
        if (!j && i + 1 >= m) ans = plusmod(ans, dp[0], MOD);
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
