import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String text = scanner.next(); int length = - 1; boolean c = false; boolean w1 = false; int start = 0; for (int i = 0; i < text.length(); i++) { if (text.charAt(i) == 'c') { start = i; c = true; } else if (text.charAt(i) == 'w' && c) { if (!w1) { w1 = true; } else { int tmpLength = i - start + 1; if (length < tmpLength) { length = tmpLength; } start = 0; c = w1 = false; } } } System.out.println(length); } }