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