M. Debug it!
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Miamiao writes a program and submits it to the judger. The judger tells her the result of each test case by a string containing P or F. P means to pass the test and F means to fail the test. Now Huihui wants to help her debug the program. He can remove the first or the last letter in $$$1$$$ minute or remove any other letter in $$$2$$$ minutes. After removing a letter from the middle the two remaining parts are joined.

Now, Huihui wants to know, how fast can he finish debugging the problem, which means he can obtain a string without any letter F?

Input

The first line of input contains an integer $$$n(1 \leq n \leq 10^6)$$$, which means the length of the string.

The second line of input contains a string $$$s(|s| = n, s_i \in \{F, P\})$$$, which means Miamiao's result.

Output

Output a number, which means the minimum time needed to debug the problem by Huihui.

Example
Input
4
FPPF
Output
2