import scala.io.StdIn

object Main extends App {

  var n = StdIn.readLine().toInt
  val k = StdIn.readLine().toInt

  println((0 until n).foldLeft(1)((acc, _) => scala.math.min(acc + k , acc * 2)))
  
}