import Control.Monad
import Data.List

getInt = read <$> getLine :: IO Int
getInts = map read . words <$> getLine :: IO [Int]

f k x = min (2*x) (x+k)

main = do
    n <- getInt
    k <- getInt
    print $ foldr ($) 1 $ replicate n (f k)

