AT_abc458_c [ABC458C] C Stands for Center
Description
You are given a string $ S $ consisting of uppercase English letters.
Find the number of substrings (contiguous subsequences) of $ S $ that satisfy all of the following conditions.
- It consists of an odd number of characters.
- Its middle character is `C`. More formally, if the extracted substring consists of $ l $ characters, its $ ((l+1)/2) $ -th character is `C`.
Even if two substrings are identical as strings, they are counted separately if they are extracted from different positions.
Input Format
The input is given from Standard Input in the following format:
> $ S $
Output Format
Output the answer.
Explanation/Hint
### Sample Explanation 1
In this input, $ S= $ `ABCCA`.
The substrings satisfying the conditions in the problem statement are the following five:
- `ABCCA`, extracted from the $ 1 $ st to $ 5 $ th characters of $ S $
- `BCC`, extracted from the $ 2 $ nd to $ 4 $ th characters of $ S $
- `C`, extracted from the $ 3 $ rd to $ 3 $ rd characters of $ S $
- `CCA`, extracted from the $ 3 $ rd to $ 5 $ th characters of $ S $
- `C`, extracted from the $ 4 $ th to $ 4 $ th characters of $ S $
### Constraints
- $ S $ is a string consisting of uppercase English letters with length between $ 1 $ and $ 5 \times 10^5 $ , inclusive.