Type: Default 1000ms 256MiB

rcx串

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Problem Description

给定一个长为 nn 的只含小写字符的字符串,求包含 rcxrcx 为子序列的子串个数。

子序列:指从给定序列中去除一些元素(也可能不去除)后,剩余元素组成的序列。这个过程中剩余元素的相对顺序保持不变。

子串:一个字符串中任意个连续的字符组成的子序列。换句话说,子串是从原字符串中截取的一段连续字符序列。

Input Format

一行长为 nn 的字符串

Output Format

一行一个数字代表满足要求子串个数

Sample

input

ccrcyepxrjqcx

output

24

Hint

1≤n≤5×1051 \leq n \leq 5\times10^5