#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair ; using pll = pair; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 998244353; constexpr double PI = 3.14159265358979323846; long long modpow(long long x, long long n) { long long ret = 1; while (n > 0) { if (n & 1) ret = (ret * x) % MOD; x = (x * x) % MOD; n >>= 1; } return ret; } int main(){ ll n,l; scanf("%lld%lld",&n,&l); ll p = (n%l==0)?(n/l-1):(n/l); cout << modpow(2,p+1)-1 << endl; return 0; }