#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair P; typedef bitset<16> BS; struct edge { int to, cost, id; }; const ll MOD = 998244353; const ll INF = 1E18; const int MAX_N = 1E+06; ll dx[4] = { -1, 1, 0, 0 }, dy[4] = { 0, 0, -1, 1 }; ll N, M; ll dp[MAX_N + 1]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N >> M; dp[0] = 1; for (int i = 1; i <= M; i++) { dp[i] = dp[i - 1]; if (i - N >= 0) { dp[i] += dp[i - N]; dp[i] %= MOD; } } // for (int i = 1; i <= M; i++) { // cout << "i = " << i << ", dp = " << dp[i] << "\n"; // } cout << (N == 1 ? 1 : dp[M]) << "\n"; return 0; }