n=int(eval(input()));k=int(eval(input()));r=1

for _ in[0]*n:r+=min(r,k)

print(r)
n,k=eval('int(input()),'*2);r=1

for _ in[0]*n:r+=min(r,k)

print(r)
n = int(eval(input()))
k = int(eval(input()))
r = 1
for _ in [0] * n:
    r += min(r, k)
print(r)

n, k = eval("int(input())," * 2)
r = 1
for _ in [0] * n:
    r += min(r, k)
print(r)

-n = int(eval(input())) -k = int(eval(input())) +n, k = eval("int(input())," * 2)