s = input() f = re.findall("mi-*n", s) print(len(f))