A. AAA
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given a string $$$S$$$ of length $$$n$$$.

The string $$$S$$$ consists only of the character 'A'.

Your task is to count how many substrings of $$$S$$$ are equal to "AAA".

A substring is a contiguous part of the string.

Input

The first and only line contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$) — the length of the string $$$S$$$.

It is guaranteed that $$$S$$$ consists of exactly $$$n$$$ characters, and all of them are equal to 'A'.

Output

Print a single integer — the number of substrings of $$$S$$$ that are equal to "AAA".

Examples
Input
5
Output
3
Input
1
Output
0
Note

For $$$n = 5$$$, the string is "AAAAA".

The substrings equal to "AAA" start at positions $$$1$$$, $$$2$$$, and $$$3$$$, so the answer is $$$3$$$.