using System; using System.Collections.Generic; using System.Linq; class Magatro { static void Main() { string s = Console.ReadLine(); s = s.Replace("-",""); Console.WriteLine(cnt(s)); } static int cnt(string s) { string st = s.Replace("m", ""); return s.Length - st.Length; } }