open Printf
open Scanf

let () =
  let n = scanf "%d " (fun x -> x) in
  let k = scanf "%d " (fun x -> x) in
  let rec loop x d =
    if x = 0 then d
    else loop (x - 1) (min (d * 2) (d + k)) in
  loop n 1 |> printf "%d\n"
