#include int moji(char *A){// int i=0,s,count,min=101; while(A[s] != '\0'){ count=0; if(A[s]=='c'){i=s; while(A[i]!='\0'){ if(A[i]=='w')count++; if(count==2){ if(min>(i-s+1))min=i-s+1; break;} i++; } }s++; } if(min!=101)return min; else return -1; } int main(){ char textA[100000]=""; scanf("%s",textA); printf("\n%d",moji(textA)); }