package me.yukicoder; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0436 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input = br.readLine(); int length = input.length(); int ans = 0; int left = input.indexOf("ccw"); int mid = (length % 2 == 0)? length / 2 - 1: length / 2; if (left <= mid) { ans = left + 1;// to left } else { ans = length - left - 2;// to right } System.out.println(ans); } }