#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);

    int n, k;
    cin >> n >> k;


    int i = 1;
    while (n--) {
        if (i + i < i + k) {
            i *= 2; 
        } else {
            i = i + k;
        }
    }

    cout << i;

    return 0;
}
