#include using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) using ll = long long; using graph = vector>; const ll mod = 998244353; const int INF = 1001001001; int main(){ ll n, k; cin >> n >> k; ll ans = 1; if(n <= k){ cout << ans << endl; return 0; } else{ ll tmp = (n-1) / k; for(ll i = 0; i < tmp; i++){ ans = (ans * 2 % mod + 1) % mod; } cout << ans << endl; } }