import re s=input() print(len(re.findall(r"mi-*n", s)))