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