import re S = input() print(len(re.findall(r"min|mi-n|mi--n|mi-------n",S)))