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

    var sum = 1
    repeat(N) {
        val d = sum * 2
        val p = sum + K
        sum = Math.min(d, p)
    }
    println(sum)
}

