import Control.Monad
import Data.List
main :: IO ()
main = readLn >>= main'
    where
        main' n = readLn >>= print . solve n

solve :: Int -> Int -> Int
solve n k = foldl' ff 1 $ replicate n 0
    where
        ff acc _
            | acc > k = acc + k
            | otherwise = acc * 2
