Imports System

Public Class Test
	Public Shared Sub Main()
		dim N as integer
		dim K as integer
		dim P as integer
		N=console.readline()
		K=console.readline()
		P=1
		for i as integer=1 to N
			if k>=p then
				p=2*p
			else
				p=p+k
			end if
		next i
		console.writeline(P)
	End Sub
End Class