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