using System; using System.Collections.Generic; using System.IO; using System.Linq; public class YukiCoder { public static void Solve() { string S = MyConsole.String(); S = S.Replace( "-", ""); string[] strs = S.Split( new []{"m"}, StringSplitOptions.RemoveEmptyEntries ); int ans = strs.Count( s => s.Equals( "in" ) ); MyConsole.wLine( ans.ToString() ); } public static void Main() { MyConsole.Read(); Solve(); MyConsole.Finish(); } } public static class MyConsole { private static List ReadedLine = new List(); private static char[] buf = new char[1024]; private static int i; public static void Read() { TextReader sr = Console.In; int Len = sr.Read( buf, 0, 1024 ); var Line = string.Empty; for (int i = 0 ; i < Len ; i++) { if (buf[i] >= 33 && buf[i] <= 126) { Line += buf[i]; } else if (Line.Length > 0) { ReadedLine.Add( Line ); Line = string.Empty; } } if (Line.Length > 0) ReadedLine.Add( Line ); Console.SetOut( new StreamWriter( Console.OpenStandardOutput() ) { AutoFlush = false } ); } public static string String() { return ReadedLine[i++]; } public static int Int() { return int.Parse( ReadedLine[i++] ); } public static long Long() { return long.Parse( ReadedLine[i++] ); } public static double Double() { return double.Parse( ReadedLine[i++] ); } public static void wLine( string output = null ) { Console.WriteLine( output ); } public static void Finish() { Console.Out.Flush(); } }