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 (Seq.toList S) 0 't' let rs = cCnt (Seq.toList S) 0 'r' let es = ( cCnt (Seq.toList S) 0 'e' ) / 2 printfn "%d" (Seq.min (ts::rs::es::[]) ) let mySol = new Sol() mySol.Solve()