#include #include using namespace std; typedef long long ll; const ll MOD = 998244353; int main() { int n, m; cin >> n >> m; vector dp(m + 1); dp[0] = 1; for (int i = 1; i <= m; i++) { dp[i] += dp[i - 1]; if (i >= n && n != 1)dp[i] += dp[i - n]; dp[i] %= MOD; } cout << dp[m] << endl; return 0; }