A - wwwvvvvvv Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 100100

問題文

vw のみからなる文字列 SS が与えられます。

SS の中に、下に尖っている部分が何箇所あるかを出力してください(入出力例にある図もご参照ください)。

制約

  • SSvw のみからなる文字列
  • SS の長さは 11 以上 100100 以下

入力

入力は以下の形式で標準入力から与えられる。

SS

出力

答えを整数として出力せよ。


入力例 1Copy

Copy
vvwvw

出力例 1Copy

Copy
7

vvwvw

上の画像のように、vvwvw という文字列には下に尖った部分が 77 箇所あります。


入力例 2Copy

Copy
v

出力例 2Copy

Copy
1

入力例 3Copy

Copy
wwwvvvvvv

出力例 3Copy

Copy
12

Score : 100100 points

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 1Copy

Copy
vvwvw

Sample Output 1Copy

Copy
7

vvwvw

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


Sample Input 2Copy

Copy
v

Sample Output 2Copy

Copy
1

Sample Input 3Copy

Copy
wwwvvvvvv

Sample Output 3Copy

Copy
12


2025-04-26 (Sat)
00:22:05 +00:00