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