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())
ans=1
for _ in range(n):
  ans=min(ans+k,2*k)
print(ans)
n=int(input())
k=int(input())
ans=1
for _ in range(n):
  ans=min(ans+k,2*ans)
print(ans)