C. CCPC
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

Given a string $$$S$$$ composed of uppercase letters, please rearrange the order of the characters in $$$S$$$ such that the substring CCPC appears as many times as possible as a contiguous substring. You are to determine the maximum possible number of occurrences of CCPC.

Input

A single line containing a string $$$S$$$ composed of uppercase letters $$$(1 \leq |S| \leq 10^6)$$$.

Output

Output a single integer, representing the maximum possible number of occurrences of CCPC.

Example
Input
ABCDCPCPC
Output
1