import Control.Monad
import Control.Applicative
import Data.List
import Data.Array
strToInteger s = (read :: String -> Integer) s

main = do
    n <- readLn :: IO Int
    k <- readLn :: IO Int
    
    print $ solve 1 n k
    
solve :: Int -> Int -> Int -> Int
solve m 0 k = m
solve m n k = solve (min (2*m) (m+k)) (n-1) k