n = int(eval(input()))

k = int(eval(input()))

tmp = 1

for i in range(n):

    tmp += tmp if tmp <= k else k



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

k = int(eval(input()))

ans = 1

for i in range(n):

  a = ans * 2

  b = ans + k

  if a < b:

    ans = a

  else:

    ans = b

print(ans)

n = int(eval(input()))
k = int(eval(input()))
tmp = 1
for i in range(n):
    tmp += tmp if tmp <= k else k
print(tmp)

n = int(eval(input()))
k = int(eval(input()))
ans = 1
for i in range(n):
    a = ans * 2
    b = ans + k
    if a < b:
        ans = a
    else:
        ans = b
print(ans)

-tmp = 1 +ans = 1 -    tmp += tmp if tmp <= k else k -print(tmp) +    a = ans * 2 +    b = ans + k +    if a < b: +        ans = a +    else: +        ans = b +print(ans)