#include #include using namespace std; int main() { string s; int ans = 0; cin >> s; for (size_t i = 0; i < s.length() - 1; i++) { if (s[i] == 'm' && s[i + 1] == 'i') { for (size_t j = i + 2; j < s.length(); j++) { if (s[j] == '-') continue; else if (s[j] == 'n') { ans++; break; } else { break; } } } } cout << ans << endl; }