#include #include #include #include //#include #include #include #include #include #include //#include #include #include #include //#include #include //#include #include #include #include #include #include const int dx[] = {1, 0, -1, 0}; const int dy[] = {0, -1, 0, 1}; using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector vi; typedef vector vll; typedef pair pii; bool check(string s) { int n = s.size(); if (n < 3 || n > 100) return false; int state = 0; for (int i = 0; i < n; ) { switch(state) { case 0: if (i+2 >= n || s.substr(i, 2) != "mi") return false; state = 1; i += 2; case 1: if (s[i] == '-') { i++; } else { if (s[i] != 'n') return false; state = 0; i++; } break; } } return !state; } int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; assert(check(s)); cout << count(s.begin(), s.end(), 'n') << endl; return 0; }