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

5fa3707352f8dc0787ed0e6f306adb3699a30ba2
<mask token>

<mask token>
for i in range(n):
    if a > k:
        a = a + k
    else:
        a = 2 * a
print(a)

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