private fun readInts() = readLine()!!.split(" ").map { it.toInt() }

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

    var min = 1
    repeat(N) { min += if (2 * min < min + K) min else K }

    println(min)
}