#include #include #include using namespace std; int main(void) { int l, n; cin >> l >> n; for (int i = 0; i < n; i++){ string s; cin >> s; } cout << (pow(2, l - 3)*n) << endl; return 0; }