#define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; int main(){ ll L, N; cin >> L >> N; ll ans; if(L == 3) ans = N; else{ ans = 1; int i = 3; while(i < L){ ans *= 2; i++; } ans *= N; } cout << ans << endl; }