#include using namespace std; int main(){ string s; cin >> s; int counter = 0; int rel =0; for(int i=0; i < s.size(); i++){ if(s[i] == '-'){ counter = 0; } if(s[i] == 'm' || s[i] == 'i' || s[i] == 'n') counter++; if(counter == 3) rel++; } cout << rel << endl; }