题目描述
Problem Background
Xiao Guo has a keyboard with only two keys.
Problem Description
One day, she typed a string consisting only of these two characters. When the string contains the substring VK, Xiao Guo particularly likes this string. Therefore, she wants to change at most one character (or make no changes) to maximize the number of occurrences of VK in the string. Given the original string, calculate the maximum number of times VK can appear in the string (only when V and K are adjacent, we consider VK to have appeared).
Input Format
The first line contains a number $n$, representing the length of the string.
The second line contains a string $s$.
Output Format
The first line outputs an integer representing the answer.
Sample Input and Output
Sample Input #1
2
VK
Sample Output #1
1
Sample Input #2
2
VV
Sample Output #2
1
Sample Input #3
1
V
Sample Output #3
0
Sample Input #4
20
VKKKKKKKKKVVVVVVVVVK
Sample Output #4
3
Sample Input #5
4
KVKV
Sample Output #5
1
Notes
For $100\%$ of the data, $1 \le n \le 100$.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分