import re match = re.findall("mi-*n",input()) print(len([m for m in match]))