using System.Numerics; public class Program { public static void Main() { //BigInteger num = BigInteger.Parse(Console.ReadLine() ?? string.Empty); //int num = int.Parse(Console.ReadLine() ?? string.Empty); //string[] moji = (Console.ReadLine() ?? string.Empty).Trim().Split(' '); string str = Console.ReadLine() ?? string.Empty; int c = 0; int w = 0; for(int i = 0; i < str.Length; i++) { if(str[i] == 'c') { c++; } else { w++; } } if(c > w) { Console.WriteLine(w); } else { Console.WriteLine(c - 1); } } }