P = 998244353 N, L = map(int, input().split()) if L > N: L = N import math n = math.ceil(N / L) print((pow(2, n, P) - 1) % P)