#include using namespace std; typedef long long ll; int main() { int l, n; cin >> l >> n; string tmp; for (int i = 0; i < n; ++i) cin >> tmp; ll ans = pow(2LL, (ll)l - 3); ans *= n; cout << ans << '\n'; return 0; }