import  scala.io.StdIn._

object Main {
  def main(args: Array[String]): Unit = {
    val n: Int = readInt()
    val k: Int = readInt()
    val ans: Int = (1 to n)
      .toList
      .foldLeft(1)((acc, x) => if (2 * acc > acc + k) acc + k else 2 * acc)
    println(ans)
  }
}
