import Data.List(minimum)
opA :: Int -> Int
opA i = 2 * i


opB :: Int -> Int -> Int
opB i k = i + k

choose :: Int -> Int -> Int
choose i k = minimum [reA, reB]
  where
    reA = opA i
    reB = opB i k

likeFor :: [Int] -> Int -> [Int] -> [Int]
likeFor [] k acc = acc
likeFor src k acc = likeFor (tail src) k acc'
  where
    acc' = (choose (head acc) k) : acc

main = do
  ns <- fmap (fmap (read :: String -> Int) . words) . lines <$> getContents
  let n = head $ head ns
  let k = head $ last ns
  let result = likeFor (replicate n 0) k [1]
  putStrLn $ show $ head result