// ccw #include #include using namespace std; char s[100005] = {}; int count_c, count_w; int main() { int i = 0; scanf("%s", s); while(i < 100000) { if(s[i] == 'c') count_c++; else if(s[i] == 'w') count_w++; i++; } cout << min(count_c - 1, count_w) << endl; return 0; }