import re S = input() l = re.findall(r'mi[-]*[n]',S) print(len(l))