#include using namespace std; int main() { int l, n; cin >> l >> n; cout << (n << (l / 3 - 1)) << endl; }