#include #include enum state { m, i, e }; int main() { std::string str; std::cin >> str; unsigned int count = 0; state current_state = e; for(auto c: str) { switch(current_state){ case state::m: if(c == 'i'){current_state = state::i;} else if(c == 'm'){current_state = state::m;} else{current_state = e;} break; case state::i: if(c == '-'){current_state = state::i;} else if(c == 'n'){current_state = state::e; count++;} else if(c == 'm'){current_state = state::m;} else{current_state = e;} break; case state::e: if(c == 'm'){current_state = state::m;} else{current_state = e;} break; } } std::cout << count <