using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukikoda { class Program { static void Main(string[] args) { string s = Console.ReadLine(); string w = s; int i = 0; while (w.Contains("ccw")) { w = w.Substring(1); i++; } int j = 0; w = s; while (w.Contains("ccw")) { w = w.Substring(0, w.Length -1); j++; } if (i > j) { Console.WriteLine(j); }else { Console.WriteLine(i); } } } }