main :: IO ()
main = do
  n <- readLn :: IO Int
  k <- readLn :: IO Int
  print $ solve n k

solve :: Int -> Int -> Int
solve n k = go n 1
  where
    go i j
      | i == 0 = j
      | j >= k = go (i-1) (k+j)
      | otherwise = go (i-1) (2 * j)
        
