#include #define rep(i,n) for (int i=0; i < (n); i++) using namespace std; using ll = long long; ll mod = 998244353; int main(){ ios::sync_with_stdio(false); ll N,L; cin>>N>>L; N = N/L + N%L; cerr << N << endl; ll ans=1; while(N--){ ans *= 2; ans %= mod; } cout << ans - 1 << endl; }