import scala.io.StdIn

object Main extends App {

  var n = StdIn.readLine().toInt
  val k = StdIn.readLine().toInt
  var r = 1
  while (r < k) {
    r = r * 2
    n -= 1
  }
  
  println((0 until n).foldLeft(r) { (acc, _) =>
    acc + k
  })

}