N = int(eval(input()))

K = int(eval(input()))

ans = float('inf')



for i in range(2**N):

  now = 1

  for j in range(N):

    if i>>j & 1:

      now *= 2

    else:

      now += K

  ans = min(ans, now)



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

K = int(eval(input()))



now = 1

for i in range(N):

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



print(now)
N = int(eval(input()))
K = int(eval(input()))
ans = float("inf")
for i in range(2**N):
    now = 1
    for j in range(N):
        if i >> j & 1:
            now *= 2
        else:
            now += K
    ans = min(ans, now)
print(ans)

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

-ans = float("inf") -for i in range(2**N): -    now = 1 -    for j in range(N): -        if i >> j & 1: -            now *= 2 -        else: -            now += K -    ans = min(ans, now) -print(ans) +now = 1 +for i in range(N): +    now = min(now * 2, now + K) +print(now)