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