fun main(args: Array<String>) {
  val N = readLine()!!.toInt()
  val K = readLine()!!.toInt()

  var x = 1
  for(i in 1..N) {
    if(2*x >= x+K){
      x += K
    } else {
      x *= 2
    }
  }
  println(x)
}