#include #include using namespace std; int main() { int ans = 0, i = 0; string s; cin >> s; while (s[i] != '\0') { if (s[i] == 'm' && s[i+1] == 'i') { i += 2; while (s[i] == '-') { i++; } if (s[i] == 'n') { ans++; } } i++; } cout << ans << endl; return 0; }