Tonio has a keyboard with only two letters, "V" and "K".

One day, he has typed out a string *s* with only these two letters. He really likes it when the string "VK" appears, so he wishes to change at most one letter in the string (or do no changes) to maximize the number of occurrences of that string. Compute the maximum number of times "VK" can appear as a substring (i. e. a letter "K" right after a letter "V") in the resulting string.
The first line will contain a string *s* consisting only of uppercase English letters "V" and "K" with length not less than 1 and not greater than 100.
For the first case, we do not change any letters. "VK" appears once, which is the maximum number of times it could appear.

For the second case, we can change the second character from a "V" to a "K". This will give us the string "VK". This has one occurrence of the string "VK" as a substring.

For the fourth case, we can change the fourth character from a "K" to a "V". This will give us the string "VKKVKKKKKKVVVVVVVVVK". This has three occurrences of the string "VK" as a substring. We can check no other moves can give us strictly more occurrences.
VK
1
VV
1
V
0
VKKKKKKKKKVVVVVVVVVK
3
KVKV
1
VKKVVVKVKVK
5
VKVVKVKVVKVKKKKVVVVVVVVKVKVVVVVVKKVKKVKVVKVKKVVVVKV
14
VVKKVKKVVKKVKKVKVVKKVKKVVKKVKVVKKVKKVKVVKKVVKKVKVVKKVKVVKKVVKVVKKVKKVKKVKKVKKVKVVKKVKKVKKVKKVKKVVKVK
32
KVVKKVKVKVKVKVKKVKVKVVKVKVVKVVKVKKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVVKVKVVKKVKVKK
32
KVVVVVKKVKVVKVVVKVVVKKKVKKKVVKVKKKVKKKKVKVVVVVKKKVVVVKKVVVVKKKVKVVVVVVVKKVKVKKKVVKVVVKVVKK
21
VVVVVKKVKVKVKVVKVVKKVVKVKKKKKKKVKKKVVVVVVKKVVVKVKVVKVKKVVKVVVKKKKKVVVVVKVVVVKVVVKKVKKVKKKVKKVKKVVKKV
25
KKVVKVVKVVKKVVKKVKVVKKV
7
KKVVKKVVVKKVKKVKKVVVKVVVKKVKKVVVKKVVVKVVVKVVVKKVVVKKVVVKVVVKKVVVKVVKKVVVKKVVVKKVVKVVVKKVVKKVKKVVVKKV
24
KVKVKVKVKVKVKVKVKVKVVKVKVKVKVKVKVKV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VVVVVVVVVVVVVVVVVVVVVVVVVVVV
1
VVKKKKKKVKK
3
KVKVKVV
3
'''
    Вредная Клавиатура
    http://codeforces.com/problemset/problem/801/A

    У Тонио есть клавиатура с двумя клавишами: буквой «V» и буквой «K».

    Однажды он набрал строку s, используя только эти две буквы. Ему нравится, когда он
    встречает подстроку «VK», поэтому он хочет изменить не больше одной буквы в строке
    (или не изменять ничего), чтобы максимизировать число вхождений этой подстроки.
    Вычислите максимальное число раз, которое строка «VK» может встретиться как
    подстрока (т. е. буква «K» сразу после буквы «V») в получившейся строке.

    Входные данные
    Единственная строка содержит строку s, которая состоит только из заглавных букв
    латинского алфавита «V» или «K» и имеет длину от 1 до 100.

    Выходные данные
    Выведите одно число — максимальное число раз, которое строка «VK» может встречаться
    как подстрока в данной строке после изменения не более одного символа.
'''

import fileinput



def get_max_vk(input_string):

    if not isinstance(input_string, str):
        raise TypeError('Value should be string')

    s_len = len(input_string)

    if s_len < 1 or s_len > 100:
        raise ValueError('String length should be between 1 and 100')

    last_char = ''
    total = 0
    can_sub = False

    for char in input_string:

        if char == 'V':

            if last_char == 'V':
                can_sub = True

        elif char == 'K':

            if last_char == 'V':
                total += 1

            elif last_char == 'K':
                can_sub = True

        else:
            raise ValueError('Input contains invalid character: ' + char)

        last_char = char

    return total + (1 if can_sub else 0)



if __name__ == '__main__':

    for line in fileinput.input():
        print(get_max_vk(line.rstrip("\n")))
