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