using System; using System.Collections.Generic; using System.Linq; namespace Test { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int i; for (i = 0; s[i] == 'c'; i++) ; Console.WriteLine(Math.Min(i - 1,s.Length - i)); } } }