local mod = 998244353 local function badd(a, b) return (a + b) % mod end local n, m = io.read("*n", "*n") if n == 1 then print(1) os.exit() end local t = {1} for i = 2, m do if n < i then t[i] = badd(t[i - 1], t[i - n]) elseif n == i then t[i] = 2 else t[i] = 1 end end print(t[m])