#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
    ll N,K;
    cin>>N>>K;
    ll cnt=1;
    rep(i,N){
        if(cnt<K){
            cnt*=2;
        }
        else{
            cnt+=K;
        }
    }
    cout<<cnt<<endl;
}

#include <iostream>
#include <bits/stdc++.h>
#define ll long long int
#define d 1000000007
using namespace std;
int main()
{
    int t;
    t=1;
    while(t--)
    {
        int n,k;
        cin >> n;
        cin >> k;
        int result=1;
        while(n>0)
        {
            result=min(result*2,result+k);
            n--;
        }
        cout << result << endl;
    }
	return 0;
}