N=int(eval(input()))

K=int(eval(input()))

n=1

for i in range(N):

    if n<K:

        n*=2

    else:

        n+=K

print(n)

def solve():

    n = int(eval(input()))

    k = int(eval(input()))

    ans = 1

    for i in range(n):

        if ans < k:

            ans *= 2

        else:

            ans += k



    print(ans)





if __name__ == "__main__":

    solve()

N = int(eval(input()))
K = int(eval(input()))
n = 1
for i in range(N):
    if n < K:
        n *= 2
    else:
        n += K
print(n)

def solve():
    n = int(eval(input()))
    k = int(eval(input()))
    ans = 1
    for i in range(n):
        if ans < k:
            ans *= 2
        else:
            ans += k
    print(ans)


if __name__ == "__main__":
    solve()

-N = int(eval(input())) -K = int(eval(input())) -n = 1 -for i in range(N): -    if n < K: -        n *= 2 -    else: -        n += K -print(n) +def solve(): +    n = int(eval(input())) +    k = int(eval(input())) +    ans = 1 +    for i in range(n): +        if ans < k: +            ans *= 2 +        else: +            ans += k +    print(ans) + + +if __name__ == "__main__": +    solve()