#include using namespace std; typedef long long LL; int main(){ LL L, N; cin >> L >> N; cout << (1LL << (L-3)) * N << endl; return 0; }