import java.util.*; public class Study_01 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int index = s.indexOf("ccw"); int sL = s.length(); int last = sL - index - 3; if(index > last){ System.out.println(last + 1); }else if(last > index){ System.out.println(index + 1); } } }