using System; namespace No346 { class Program { static void Main(string[] args) { int num = 0; string word = "cww"; string text = Console.ReadLine(); for (int i = 0; i < text.Length; i++) { if (text[i] == word[0]) { for (int j = i + 1; j < text.Length; j++) { if (text[j] == word[1]) { for (int k = j + 1; k < text.Length; k++) if (text[k] == word[2]) num++; } } } } Console.WriteLine(num); } } }