# coding: utf-8 # Your code here! N,L=map(int,input().split()) LL=(N+L-1)//L ans=pow(2, LL, 998244353)-1 print(ans)