#include #include using namespace std; long long nC2(long long a){ if( a < 2) return 0; return a * (a-1) / 2 ; } int main() { // your code goes here cin.tie(0); ios::sync_with_stdio(false); vector vec; long long ans = 0; long long c = 0; long long w=0; for(char ch; cin >> ch;){ if((ch == 'c' || ch == 'w')) vec.push_back(ch); if(ch == 'c') c++; if(ch=='w') w++; } if(c == 0 || w == 0){ cout << "0" << endl; return 0;} for(long long i = 0; i