100 atcoder#ABC150B. [ABC150B] Count ABC

[ABC150B] Count ABC

Score : 200200 points

Problem Statement

We have a string SS of length NN consisting of uppercase English letters.

How many times does ABC occur in SS as contiguous subsequences (see Sample Inputs and Outputs)?

Constraints

  • 3N503 \leq N \leq 50
  • SS consists of uppercase English letters.

Input

Input is given from Standard Input in the following format:

NN

SS

Output

Print number of occurrences of ABC in SS as contiguous subsequences.

10
ZABCDBABCQ
2

Two contiguous subsequences of SS are equal to ABC: the 22-nd through 44-th characters, and the 77-th through 99-th characters.

19
THREEONEFOURONEFIVE
0

No contiguous subsequences of SS are equal to ABC.

33
ABCCABCBABCCABACBCBBABCBCBCBCABCB
5