n = int(eval(input()))

k = int(eval(input()))

cur = 1

for i in range(n):

    if (cur * 2) > (cur + k):

        cur += k

    else:

        cur *= 2

print(cur)
n = int(eval(input()))

k = int(eval(input()))

res = 1

for i in range(n):

    if res > k:

        res += k

    else:

        res *= 2

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

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

-cur = 1 +res = 1 -    if (cur * 2) > (cur + k): -        cur += k +    if res > k: +        res += k -        cur *= 2 -print(cur) +        res *= 2 +print(res)