#include <bits/stdc++.h>
//#include<iomanip> 
//#include<cmath> 
using namespace std;

int main() {

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

    int n, k, i=1;
    cin >> n >> k;
    while(n--)
    {
        if(i + i < i + k)
        {
            i = i+i;
        }else{
            i = i+k;
        }
        //cout << i << endl;
    }

    cout << i;

}