s = input() import re pat = r'mi-*?n' res = re.findall(pat,s) print(len(res))