#include #include #include #include #include int main() { int c = -1; int w1 = -1; int w2 = -1; int strNum = 0; char str[100001] = "chiwaaaaaaamikawayadeeeeesu"; scanf("%s", str); for (int i = 0;str[i] != '\0';i++) { if (str[i] == 'c' && c == -1) { c = i; break; } } for (int i = c + 1;str[i] != '\0';i++) { if (str[i] == 'w' && w1 == -1) { w1 = i; break; } } for (int i = w1 + 1;str[i] != '\0';i++) { if (str[i] == 'w' && w2 == -1) { w2 = i; break; } } strNum = w2 - c + 1; printf("%d\n", strNum ); return 0; }