// No.418 ミンミンゼミ // https://yukicoder.me/problems/no/418 // #include #include #include #include using namespace std; int solve(string &S); int main() { string S; cin >> S; int ans = solve(S); cout << ans << endl; } int solve(string &S) { int ans = 0; regex rx(R"(mi-*n)"); sregex_token_iterator it(S.begin(), S.end(), rx, -1); sregex_token_iterator end; while (it != end) { it++; ans++; } return ans; }