n = int(eval(input()))

k = int(eval(input()))



val = 1



for i in range(n):

	if val > k:

		val += k

	else:

		val *= 2



print(val)
x = int(input())

y = int(input())

d = 1

for i in range(0, x):

 if y > d:

  d += d

 else:

  d += y

print(d)

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

x = int(input())
y = int(input())
d = 1
for i in range(0, x):
    if y > d:
        d += d
    else:
        d += y
print(d)

-n = int(eval(input())) -k = int(eval(input())) -val = 1 -for i in range(n): -    if val > k: -        val += k +x = int(input()) +y = int(input()) +d = 1 +for i in range(0, x): +    if y > d: +        d += d -        val *= 2 -print(val) +        d += y +print(d)