using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { string s = Console.ReadLine(); int n = s.Length - s.Replace("m", "").Length; Console.WriteLine(n); Console.Read(); } }