#arc140b. [arc140_b]Shorten ARC

[arc140_b]Shorten ARC

Problem Statement

You are given a string SS of length NN consisting of A,R,C.

As long as SS contains three consecutive characters that are ARC, you can perform the operation below.

  • In an odd-numbered (11-st, 33-rd, 55-th, ...) operation, choose in SS three consecutive characters that are ARC, and replace them with R.
  • In an even-numbered (22-nd, 44-th, 66-th, ...) operation, choose in SS three consecutive characters that are ARC, and replace them with AC.

Find the maximum number of operations that can be performed.

Constraints

  • 1leqNleq2times1051 \\leq N \\leq 2\\times 10^5
  • SS is a string of length NN consisting of A,R,C.

Input

Input is given from Standard Input in the following format:

NN SS

Output

Print the answer.


Sample Input 1

6
AARCCC

Sample Output 1

2

You can perform two operations as follows.

AARCCCARCCACC


Sample Input 2

5
AAAAA

Sample Output 2

0

SS does not contain three consecutive characters that are ARC, so you cannot perform the operation at all.


Sample Input 3

9
ARCARCARC

Sample Output 3

3