MOD = 998244353 MAX = 10 ** 6 * 2 + 10 fact = [0] * MAX inv = [0] * MAX fact[0] = 1 for i in range(1, MAX): fact[i] = fact[i - 1] * i % MOD inv[MAX - 1] = pow(fact[MAX - 1], MOD - 2, MOD) for i in range(MAX - 1, 0, -1): inv[i - 1] = inv[i] * i % MOD def nPk(n, k): return fact[n] * inv[n - k] % MOD def nCk(n, k): return nPk(n, k) * inv[k] % MOD n, m = map(int, input().split()) if (n == 1 or m == 1): print(1) exit(0) ans = 0 for i in range(0, m + 1, n): sikiri = i // n rest = m - sikiri * n ans += nCk(sikiri + rest, sikiri) ans %= MOD print(ans)