import java.util.Scanner
import scala.util.control.Breaks

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)

    val N, K = sc.nextInt
    var ans = 1
    (1 to N).foreach(_ => {
      ans += math.min(K, ans)
    })

    println(ans)
  }
}