import sys import os import math import copy line = raw_input().strip() for rep in ["mi--n", "min", "min", "min", "mi-------n"]: line = line.replace(rep, "!|!") print line.count("|")