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