#include "bits/stdc++.h" using namespace std; int main() { int N, M; cin >> N >> M; cout << ((1L << (N - 3)) * M) << endl; }