using System; public class Hello { public static void Main() { var s = Console.ReadLine().Trim(); var sL = s.Length; var ccount = sL - s.Replace("c", "").Length; var wcount = sL - ccount; Console.WriteLine(ccount <= wcount ? ccount - 1 : wcount); } }