open Batteries
let () =
  let n = Scanf.scanf "%d " (fun a -> a) in
  let k = Scanf.scanf "%d " (fun a -> a) in

  let rec aux n res =
    if n = 0 then res else
      aux (n-1) (if res*2 > res+k then res+k else res*2)
  in
  Printf.printf "%d\n" @@
  aux n 1
