#include int main(void) { char s; int c = 0; int w = 0; while(scanf("%c", &s) != EOF){ //printf("%c", s); if(s == 'c')c++; if(s == 'w')w++; } //printf("c:%d, w:%d\n", c, w); c = c - 1; if( c < w)printf("%d\n", c); else printf("%d\n", w); return 0; }