N, M = map(int, input().split()) MOD = 998244353 dp = [0]*(M+1) dp[0] = 1 for i in range(1, M+1): dp[i] += dp[i-1] if i>=N: dp[i] += dp[i-N] dp[i] %= MOD print(dp[M])