local mod = 998244353 local function badd(x, y) return (x + y) % mod end local n, k = io.read("*n", "*n") local t = {1} local tsum = {1} for i = 2, n + 1 do local r = i - k if 1 <= r then t[i] = tsum[r] else t[i] = 0 end tsum[i] = badd(t[i], tsum[i - 1]) end print(tsum[n + 1])