#include #include // #include using namespace std; using ll = long long; int main() { ll N, K; cin >> N >> K; string t; cin >> t; // DP[i番目] := i〜endのパターン数 vector DP(N+1, -1LL); DP[N] = 1LL; DP[N-1] = 1LL; for (int i=N-2;0<=i;i--) { string s1 = t.substr(i, 1); string s2 = t.substr(i, 2); int d1 = stoi(s1); int d2 = stoi(s2); if (d1 == 0) { DP[i] = 0; } else if (d2==10 || d2==20) { DP[i] = DP[i+2]; } else if (d2<=26) { DP[i] = DP[i+1] + DP[i+2]; } else { DP[i] = DP[i+1]; } } // function dfs = [&](int n) { // if (-1LL