You are given a string $S$ of length $N$. Each character of $S$ is either A, O, or I.
When extracting $3$ consecutive characters contained in $S$, output the number of such substrings that are A, O, I or I, O, I in order.
Constraints
- $1 \le N \le 100$.
- $S$ is a string of length $N$.
- Each character of $S$ is either
A,O, orI. - $N$ is an integer.
Input
The input is given in the following format:
N S
Output
Output the sum of the number of occurrences of AOI and the number of occurrences of IOI contained in $S$.
Do not output anything other than the answer. (Do not output prompt sentences or anything similar.)
Examples
Input 1
5
IAOIO
Output 1
1
Note 1
- The $2$-nd, $3$-rd, and $4$-th characters of $S$ are
A,O, andI, respectively. - The $3$ characters
I,O,Ido not appear consecutively in this order in $S$.
The total number of occurrences of AOI and IOI contained in $S$ is $1$. Therefore, output $1$.
Input 2
8
AOIOIOIA
Output 2
3
Note 2
- The $1$-st, $2$-nd, and $3$-rd characters of $S$ are
A,O, andI, respectively. - The $3$-rd, $4$-th, and $5$-th characters of $S$ are
I,O, andI, respectively. - The $5$-th, $6$-th, and $7$-th characters of $S$ are
I,O, andI, respectively.
The total number of occurrences of AOI and IOI contained in $S$ is $3$. Therefore, output $3$.
Input 3
6
IIOOII
Output 3
0
Note 3
Neither AOI nor IOI is contained in $S$. Therefore, output $0$.
Input 4
15
IAOIAOAOIOIAIOI
Output 4
4
Note 4
The total number of occurrences of AOI and IOI contained in $S$ is $4$. Therefore, output $4$.