#include #include int main(void){ char buf[100] = {}; char str[] = "cww"; int i = 0, j = 0; fgets(buf, sizeof(buf), stdin); while(buf[i] != '\0'){ if(buf[i] == str[j]){ j++; if(j == (sizeof(str)) - 1){ printf("%d\n", i+1); exit(0); } } i++; } printf("-1\n"); return 0; }