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