""" N*Nの範囲だけ、横向きでも行ける """ N,M = map(int,input().split()) if N > M or N == 1: print (1) else: dp = [0] * (M+1) dp[0] = 1 mod = 998244353 for i in range(M): dp[i+1] += dp[i] dp[i+1] %= mod if i+N <= M: dp[i+N] += dp[i] dp[i+N] %= mod print (dp[-1] % mod)