import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n = sc.nextInt
  val k = sc.nextInt

  val res = (1 to n).foldLeft(1){(acc, i) =>
    Math.min(acc * 2, acc + k)
  }

  println(res)

}