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