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

int main(){
 string s1,s2;
  cin>>s1>>s2;
  cout<<s2+s1<<endl;
}
#include <bits/stdc++.h>
#define ll long long int
#define yorn(f) cout<<((f)?"Yes":"No")<<endl;
#define YORN(f) cout<<((f)?"YES":"NO")<<endl;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i, n) for (int i = 1; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define put(x) cout << x << endl;
#define println(x) cout << x << endl;
using namespace std;
int main()
{
    int n, k;
    cin >> n >> k;
    int v = 1;
    rep(i, n) {
        v = min(v * 2, v + k);
    }
    put(v)
    
    return 0;
}