module Main where

import qualified Data.Vector as V
import           Data.List
import           Control.Applicative
import           Control.Monad

main :: IO ()
main = do
  n <- readLn
  k <- readLn
  print $ f n k 1

f 0 _ c = c
f n k c = f (n - 1) k $ min (2 * c) (c + k)