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

int main() {
    int n;
    int k;
    int numShow = 1;
    int minNumber = 9999999;
    cin >> n >> k;

    for (int i = 0; i < n; i++) {
        // 操作Aの処理
        for (int a = i; a < n; a++) {
            numShow *= 2;
            //cout << "a";
            // if (numShow > minNumber) {
            //     break;
            // }
        }

        // 操作Bの処理
        for (int b = n - i; b < n; b++) {
            numShow += k;
            //cout << "b";
            // if (numShow > minNumber) {
            //     break;
            // }
        }

        //cout << numShow << endl;
        if (numShow < minNumber) {
            minNumber = numShow;
        }

        numShow = 1;
    }
    
    cout << minNumber << endl;
}
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,K;
  int A=1;
    cin>>N>>K;
  for(int i=0;i<N;i++) {
    if (A<K) 
      A*=2;
    else 
      A+=K;
  	}
  cout<<A<<endl;
  }