n, l = gets.split.map(&:to_i) D = 998244353 def hanoi(n) return 1 if n <= 1 hanoi(n-1)*2 + 1 end puts hanoi(n-l+1)