N = int(eval(input()))

K = int(eval(input()))



ans = None

for i in range(2 ** N):

    tmp = 1

    for j in range(N):

        if ((i >> j) &1):

            tmp += K

        else:

            tmp *= 2

    if ans == None:

        ans = tmp

    else:

        ans = min(ans, tmp)



print (ans)



import itertools

N = int(eval(input()))

K = int(eval(input()))



ans = 10 ** 18

for i in itertools.product('AB', repeat = N):

    tmp = 1

    for j in i:

        if j == 'A':

            tmp *= 2

        else:

            tmp += K

    # print (i, tmp)

    ans = min(ans, tmp)



print (ans)

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

import itertools

N = int(eval(input()))
K = int(eval(input()))
ans = 10**18
for i in itertools.product("AB", repeat=N):
    tmp = 1
    for j in i:
        if j == "A":
            tmp *= 2
        else:
            tmp += K
    # print (i, tmp)
    ans = min(ans, tmp)
print(ans)

+import itertools + -ans = None -for i in range(2**N): +ans = 10**18 +for i in itertools.product("AB", repeat=N): -    for j in range(N): -        if (i >> j) & 1: +    for j in i: +        if j == "A": +            tmp *= 2 +        else: -        else: -            tmp *= 2 -    if ans == None: -        ans = tmp -    else: -        ans = min(ans, tmp) +    # print (i, tmp) +    ans = min(ans, tmp)