#include using namespace std; int main() { int N, M; cin >> N >> M; if (N == 1) return cout << 1 << "\n", 0; vector DP(M, 1); for (int i = N - 1; i < M; i++) { (DP.at(i) = ((i - 1 < 0) ? 1 : DP.at(i - 1)) + ((i - N < 0) ? 1 : DP.at(i - N))) %= 998244353; } cout << DP.at(M - 1) << "\n"; }