def main():

    n, k = int(eval(input())), int(eval(input()))

    cnt = 0

    x = 1



    for _ in range(n):

        x *= 2

        cnt += 1

        if x > k:

            break



    print((x + k * (n - cnt)))





if __name__ == "__main__":

    main()

def main():

    n, k = int(eval(input())), int(eval(input()))

    x = 1



    for _ in range(n):

        x = min(2 * x, x + k)

    print(x)





if __name__ == "__main__":

    main()

def main():
    n, k = int(eval(input())), int(eval(input()))
    cnt = 0
    x = 1
    for _ in range(n):
        x *= 2
        cnt += 1
        if x > k:
            break
    print((x + k * (n - cnt)))


if __name__ == "__main__":
    main()

def main():
    n, k = int(eval(input())), int(eval(input()))
    x = 1
    for _ in range(n):
        x = min(2 * x, x + k)
    print(x)


if __name__ == "__main__":
    main()

-    cnt = 0 -        x *= 2 -        cnt += 1 -        if x > k: -            break -    print((x + k * (n - cnt))) +        x = min(2 * x, x + k) +    print(x)