using System; using System.Linq; class Program { static void Main(string[] args) { string S = Console.ReadLine(); int[] cnt = new int[3]; cnt[0] = S.Count(x => x == 't'); cnt[1] = S.Count(x => x == 'r'); cnt[2] = S.Count(x => x == 'e') / 2; Array.Sort(cnt); Console.WriteLine(cnt[0]); } }