P3741 Xiao Guo's Keyboard

Background

Xiao Guo has a keyboard with only two keys.

Description

One day, she typed a string consisting of only these two characters. She especially likes a string when it contains the substring `VK`. Therefore, she wants to change at most one character (or do nothing) to maximize the number of occurrences of `VK` in the string. Given the original string, compute the maximum number of times `VK` can appear in the string. We consider `VK` to occur only when `V` and `K` are exactly adjacent.

Input Format

The first line contains an integer $n$, the length of the string. The second line contains a string $s$.

Output Format

Output a single integer, the answer.

Explanation/Hint

For $100\%$ of the testdata, $1 \le n \le 100$. Translated by ChatGPT 5