s = input() count = 0 sw_no = True sw_m = False sw_i = False sw_n = False for i in range(len(s)): if sw_no: if s[i] == "m": sw_no = False sw_m = True elif sw_m: if s[i] == "i": sw_m = False sw_n = True elif sw_n: if s[i] != "-" and s[i] != "n": sw_no = True sw_n = False elif s[i] == "n": count += 1 sw_no = True sw_n = False print(count)