s=gets.chomp p [s.count("t"),s.count("r"),s.count("e")/2].max