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

typedef long long ll;

int n, k;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n >> k;
    int cur = 1;
    while (n) {
        cur = min(cur * 2, cur + k);
        --n;
    }
    cout << cur << endl;

    return 0;
}


#include<iostream>
using namespace std;

int main() {
    int N, K; cin >> N >> K;
    int ans = 1000;
    for (int i = 0; i <= N; i++) {
        int num = 1;
        for (int k = 0; k < i; k++) {
            num *= 2;
        }
        for (int k = 0; k < N - i; k++) {
            num += K;
        }
        ans = min(ans, num);
    }
    cout << ans << endl;
}

