using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { var va = Console.ReadLine().Where(c => c == 't' || c == 'r' || c == 'e'); var nt = va.Count(c => c == 't'); var nr = va.Count(c => c == 'r'); var ne = va.Count(c => c == 'e') / 2; var na = nt < nr ? nt : nr; var nb = na < ne ? na : ne; Console.WriteLine(nb); Console.ReadLine(); } } }