let solve n k =
  let rec aux res n =
    if n = 0 then res else begin
      if res < k then aux (res * 2) (n - 1)
      else aux (res + k) (n - 1)
    end in
  aux 1 n

let () = 
  Scanf.scanf "%d\n%d" solve |> print_int ;
  print_newline ()