program ABC_076_B_AdditionandMultiplication
   implicit none
   integer N, K, countN, i
   read(*, *) N, K
   countN = 1
   do i = 1, N
       if(countN * 2 <= countN + K) then
	       countN = countN * 2
	   else
	       countN = countN + K
	   end if
   end do
   write(*, *) countN
end program ABC_076_B_AdditionandMultiplication