program main
  implicit none
  integer :: n, i, k, res
  read(*, *) n
  read(*, *) k
  res = 1
  do i = 1, n
    if (res > k) then
      res = res + k
    else
      res = res * 2
    end if
  end do
  write(*, "(i0)") res
end program main
