solve ::Int -> Int -> Int -> Int
solve 0 _ a = a
solve n k a = max (solve n1 k (a + k)) (solve n1 k (a * 2))
  where
    n1 = n - 1

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