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