using System; using System.Text.RegularExpressions; class No418 { static void Main(string[] args) { string str = Console.ReadLine(); Regex re = new Regex("mi-*n", RegexOptions.IgnoreCase | RegexOptions.Singleline); int count = 0; for (Match m = re.Match(str); m.Success; m = m.NextMatch()) { count++; } Console.WriteLine(count); } }