let inpt = readLine()! let cCount = inpt.reduce(0, {$0 + ($1 == "c" ? 1 : 0)}) let ans = min(cCount-1, inpt.count-cCount) print(ans)