#include inline long nextInt(void) { long temp; std::cin >> temp; return temp; } int main() { int L, N; std::string str; std::cin >> L >> N; for(int i = 0; i < N; ++i) { std::cin >> str; } std::cout << (int)pow(2, (L-3)) * N << std::endl; return 0; }