#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; int L, N; string s; void input() { cin >> L >> N; rep(i, 0, N) cin >> s; } void solve() { cout << (int)pow(2, L - 3) * N << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); input(); solve(); getchar(); }