#include using namespace std; using ll = long long; using ld = long double; const ll mod = 998244353; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); fixed(cout).precision(12); ll N, K; cin >> N >> K; vector dp(N + 1, 0); dp[0] = 1; for(int i = 1; i <= N; i++) if(i - K >= 0) dp[i] = (dp[i - K] + dp[i - 1]) % mod; ll ans = 0; for(auto a: dp) (ans += a) %= mod; cout << ans << endl; }