#246. 统计子串"xx"出现次数
统计子串"xx"出现次数
Count 'xx' Substrings
Background
Congcong is currently learning about string processing. He encountered an interesting problem that requires counting the occurrences of a specific substring within a given string.
Problem Description
Count the number of "xx" in the given string. Overlapping is allowed, so "xxx" contains 2 "xx".
Input Format
Input is given from standard input in the following format.
A string .
Output Format
Output is printed to standard output in the following format.
An integer, representing the count of "xx".
Sample
abcxx
1
xxx
2
xxxx
3
Sample Explanation
For the input "xxx\