#include using namespace std; int main(void) { int L, n; cin >> L >> n; cout << ((1 << (L - 3)) * n) << endl; return 0; }