n, l = gets.split.map(&:to_i) D = 998244353 def pow2mod(n) raise 'must not happen' if n < 0 return 1 if 0 == n p = (pow2mod(n/2) ** 2) p *= 2 if 1 == n%2 p % D end l = [l, n].min n = n - l + 1 puts (pow2mod(n) - 1) % D