import re print(len(re.findall(r'mi-*n', input())))