import re print(len(re.findall("mi[-]*n",input())))