# ABC076-B

N = int(eval(input()))

K = int(eval(input()))

ans_list = []

for a in range(N+1):

    tmp = 1

    b = N - a

    for i in range(a):

        tmp  *= 2

    tmp += b * K

    ans_list.append(tmp)   

print((min(ans_list)))
# ABC076-B

N = int(eval(input()))

K = int(eval(input()))

ans = 1

for i in range(N):

    if ans * 2 < ans + K:

        ans *= 2

    else:

        ans += K

print(ans)
# ABC076-B
N = int(eval(input()))
K = int(eval(input()))
ans_list = []
for a in range(N + 1):
    tmp = 1
    b = N - a
    for i in range(a):
        tmp *= 2
    tmp += b * K
    ans_list.append(tmp)
print((min(ans_list)))

# ABC076-B
N = int(eval(input()))
K = int(eval(input()))
ans = 1
for i in range(N):
    if ans * 2 < ans + K:
        ans *= 2
    else:
        ans += K
print(ans)

-ans_list = [] -for a in range(N + 1): -    tmp = 1 -    b = N - a -    for i in range(a): -        tmp *= 2 -    tmp += b * K -    ans_list.append(tmp) -print((min(ans_list))) +ans = 1 +for i in range(N): +    if ans * 2 < ans + K: +        ans *= 2 +    else: +        ans += K +print(ans)