using System; using System.Linq; namespace ConsoleApp2 { class Program { static void Main(string[] args) { int a = Console.ReadLine().Count(x => x == 'm'); Console.WriteLine(a); } } }