Problem
For an integer $n$ ($1 \le n$), the string formed by alternating $n+1$ 'I's and $n$ 'O's starting with 'I' is called $P_n$. Here, 'I' and 'O' are uppercase English letters.
- $P_1$:
IOI - $P_2$:
IOIOI - $P_3$:
IOIOIOI - $P_n$:
IOIOIO$\cdots$OI($n$'O's)
Figure 1-1: Definition of the string $P_n$ for an integer $n$ ($1 \le n$)
Given an integer $n$ and a string $s$ consisting only of 'I' and 'O', write a program that outputs how many places in the string $s$ contain the string $P_n$ as a contiguous substring.
Input
The input consists of $3$ lines:
- The $1$st line contains an integer $n$ ($1 \le n \le 1000000$).
- The $2$nd line contains an integer $m$ ($1 \le m \le 1000000$). Here $m$ represents the number of characters in the string $s$.
- The $3$rd line contains the string $s$, which consists only of 'I' and 'O'.
In all test data, $2n + 1 \le m$ holds. Also, for $50\%$ of the score, $n \le 100$ and $m \le 10000$ hold.
Output
Output a single line containing an integer representing how many places in the string $s$ contain the string $P_n$. If $P_n$ is not contained in $s$ at all, output $0$.
Sample 1
1
13
OOIOIOIOIIOII
4
Sample 2
2
13
OOIOIOIOIIOII
2
Sample Explanation
When the integer $n$ is $1$ and the string $s$ is OOIOIOIOIIOII, the string $P_1$, which is IOI, is contained in $4$ places as shown in Figure 1-2 below, so the integer to output is $4$.
OOIOIOIOIIOII
^^^
^^^
^^^
^^^
Figure 1-2: For Sample 1, the string $P_1$ is contained in $4$ places
When the integer $n$ is $2$ and the string $s$ is OOIOIOIOIIOII, the string $P_2$, which is IOIOI, is contained in $2$ places as shown in Figure 1-3 below, so the integer to output is $2$.
OOIOIOIOIIOII
^^^^^
^^^^^
Figure 1-3: For Sample 2, the string $P_2$ is contained in $2$ places