import std.stdio, std.conv, std.string;

long search(long n, long k, long cur)
{
    if (n == 0) { return cur; }
    long a = search(n-1, k, cur+k);
    long b = search(n-1, k, cur*2);

    return (a>b) ? b : a;
}

void main() {
    long n, k;

    scanf("%d %d", &n ,&k);

    writeln(search(n, k, 1));
}
