main = getLine >>= print . ccw ccw s = min (length c - 1) (length w) where (c,w) = span (=='c') s