using System; using System.Linq; using System.Collections.Generic; using System.Text.RegularExpressions; class Program { static void Main() { var inp = Console.ReadLine(); var searchChiwawa = new SearchString(); searchChiwawa.SearchChiwawa(inp); } } class SearchString { public void SearchChiwawa(string alph) { // 正規表現でcww文字列を検索 Match regResult = Regex.Match(alph, "c?w.?w"); var strCount = regResult.Value; var ans = strCount.Count(); Console.WriteLine(ans); } }