Square1001 has seen an electric bulletin board displaying the integer 1. He can perform the following operations A and B to change this value:    * Operation A: The displayed value is doubled.   * Operation B: The displayed value increases by K.  Square1001 needs to perform these operations N times in total. Find the minimum possible value displayed in the board after N operations.
n=int(input())
k=int(input())

x=1
for i in range(n):
 if x*2>=x+k:
  x*=2
 else:
  x+=k
print(x)
n=int(input())
k=int(input())

num=1
for i in range(n):
  num=min(num*2,num+k)

print(num)