import java.util.*; class A{ static Scanner s = new Scanner(System.in); public static void main(String[] args) { String[] in = s.next().split("ccw"); System.out.println(Math.min(in[0].length(), in[1].length())+1); } }