#include <bits/stdc++.h>
using namespace std;
int main () {
int n, times = 0;
cin>>n;
string str;
cin>>str;
for(int i = 0; i < n - 1; i++) {
if(str[i] == 'V' && str[i + 1] == 'K') {
times++;
}
}
for(int i = 0; i < n - 1; i++) {
if(str[i] == 'V' && str[i + 1] != 'K') {
times++;
break;
} else if(str[i + 1] == 'K' && str[i] != 'V') {
times++;
break;
}
}
cout<<times;
return 0;
}
15, 29, 35, 37, 49, 50测试点WA