import strutils let s: string = stdin.readline c: int = s.count('c') w: int = s.len - c ans: int = min(c - 1, w) echo ans