#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input int L, N; cin >> L >> N; set S; rep(i, N) { string s; cin >> s; S.insert(s); } // Output cout << (1 << (L - 3)) * S.size() << endl; }