n = int(eval(input()))

k = int(eval(input()))



cnt = 1

tmp = 0

for i in range(n):

    cnt = min(cnt*2, cnt + k)

print(cnt)
N = int(eval(input()))

K = int(eval(input()))

display = 1



for i in range(N):

    display = min(display*2, display + K)

print(display)

n = int(eval(input()))
k = int(eval(input()))
cnt = 1
tmp = 0
for i in range(n):
    cnt = min(cnt * 2, cnt + k)
print(cnt)

N = int(eval(input()))
K = int(eval(input()))
display = 1
for i in range(N):
    display = min(display * 2, display + K)
print(display)

-n = int(eval(input())) -k = int(eval(input())) -cnt = 1 -tmp = 0 -for i in range(n): -    cnt = min(cnt * 2, cnt + k) -print(cnt) +N = int(eval(input())) +K = int(eval(input())) +display = 1 +for i in range(N): +    display = min(display * 2, display + K) +print(display)