using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Magatro { static void Main() { string S = Console.ReadLine(); int[] tree = new int[3]; for(int i = 0; i < S.Length; i++) { switch (S[i]) { case 't': tree[0]++; break; case 'r': tree[1]++; break; case 'e': tree[2]++; break; } } tree[2] /= 2; Console.WriteLine(tree.Min()); } }