using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Yuki { class Program { static void Main(string[] args) { string S = Console.ReadLine(); int[] a = { 0, 0, 0 }; for (int i = 0; i < S.Length; i++) { if (S[i].Equals('t')) a[0]++; if (S[i].Equals('r')) a[1]++; if (S[i].Equals('e')) a[2]++; } a[2] = a[2] / 2; Console.WriteLine(a.Min()); } } }