#abc150b. [abc150_b]Count ABC
[abc150_b]Count ABC
Problem Statement
We have a string of length consisting of uppercase English letters.
How many times does ABC
occur in as contiguous subsequences (see Sample Inputs and Outputs)?
Constraints
- consists of uppercase English letters.
Input
Input is given from Standard Input in the following format:
Output
Print number of occurrences of ABC
in as contiguous subsequences.
Sample Input 1
10
ZABCDBABCQ
Sample Output 1
2
Two contiguous subsequences of are equal to ABC
: the -nd through -th characters, and the -th through -th characters.
Sample Input 2
19
THREEONEFOURONEFIVE
Sample Output 2
0
No contiguous subsequences of are equal to ABC
.
Sample Input 3
33
ABCCABCBABCCABACBCBBABCBCBCBCABCB
Sample Output 3
5