#abc279a. A - wwwvvvvvv

A - wwwvvvvvv

问题描述

给定一个仅包含字符 vw 的字符串 SS

输出字符串 SS 中“bottoms”的数量(请参考示例输入/输出中的图示)。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

You are given a string SS consisting of v and w.

Print the number of "bottoms" in the string SS (see the figure at Sample Input/Output).

Constraints

  • SS is a string consisting of v and w.
  • The length of SS is between 11 and 100100, inclusive.

Input

The input is given from Standard Input in the following format:

SS

Output

Print the answer as an integer.

Sample Input 1

vvwvw

Sample Output 1

7

vvwvw

The image above shows the seven "bottoms" in the string vvwvw.

Sample Input 2

v

Sample Output 2

1

Sample Input 3

wwwvvvvvv

Sample Output 3

12

UPDATE @ 2024/3/12 14:10:47