import re def main(): S = input() minmin = re.findall('mi[-]*n', S) print(len(minmin)) main()