import java.io.BufferedReader
import java.io.InputStreamReader

fun main(args: Array<String>) {
    val br = BufferedReader(InputStreamReader(System.`in`))
    val n = br.readLine().toInt()
    val k = br.readLine().toInt()
    var current = 1
    (1..n).forEach {
        if (current <= k) {
            current *= 2
        } else {
            current += k
        }
    }
    println(current)
}