open System type Sol() = member this.Solve() = let S = stdin.ReadLine() let rec cCnt ss c = match ss with | [] -> 0 | x :: tail -> (if x = c then 1 else 0 ) + cCnt tail c let ts = cCnt (Seq.toList S) 't' let rs = cCnt (Seq.toList S) 'r' let es = ( cCnt (Seq.toList S) 'e' ) / 2 printfn "%d" (Seq.max (ts::rs::es::[]) ) let mySol = new Sol() mySol.Solve()