#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int l,n; cin>>l>>n; int ans=n; l-=3; while(l)ans*=2,--l; cout<