#include #include using namespace std; const int mod = 998244353; int dp[1000009]; int main() { int N, M; cin >> N >> M; dp[0] = 1; int x = 0; for (int i = 1; i <= M; ++i) { dp[i] = dp[i - 1]; if (i >= N) { dp[i] += dp[i - N]; if (dp[i] >= mod) dp[i] -= mod; } } cout << dp[M] << endl; return 0; }