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