using System; using System.Collections.Generic; using System.Linq; class Program { static string InputPattern = "Input4"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("takahashikunlovesyukicoder"); //1 } else if (InputPattern == "Input2") { WillReturn.Add("treapisnotki"); //0 } else if (InputPattern == "Input3") { WillReturn.Add("eerteerteerteert"); //4 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); string S = InputList[0]; int CntT = S.Count(X => X == 't'); int CntR = S.Count(X => X == 'r'); int CntE = S.Count(X => X == 'e'); int Answer = Math.Min(CntT, CntR); Answer = Math.Min(Answer, CntE/2); Console.WriteLine(Answer); } }