#include using namespace std; typedef long long ll; typedef pair P; const int INF = 1e9; const int mod = 1e9+7; const double EPS = 1e-10; const double PI = acos(-1.0); int main() { string s,t; cin >> s; for(int i = 0; i < s.size(); i++){ if(s[i] != '-') t.push_back(s[i]); } int res = 0; for(int i = 0; i <= t.size()-3; i++){ if(t.substr(i,3) == "min") res++; } cout << res << endl; return 0; }