#include #define rep(i, a, n) for(int i = a; i < n; i++) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define int long long using namespace std; signed main(){ string s; cin >> s; int ans = 0; int f = 0; rep(i, 0, s.size()){ if(f == 0 && s[i] == 'm') f++; else if(f == 1 && s[i] == 'i') f++; else if(f == 2 && s[i] == 'n'){ f = 0; ans++; }//else if(f == 2 && s[i] == '-') } cout << ans << endl; }