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