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