#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++I) typedef long long ll; const int MOD = 1e9+7; const int SIZE = 100010; ll inv[SIZE],fac[SIZE],finv[SIZE]; void make(){ fac[0]=fac[1]=1; finv[0]=finv[1]=1; inv[1]=1; for(int i=2;i> s; int cnt = 0; ll ans = 0; for(int i = s.length()-1; i >= 0; i--) { if(s[i]=='w') cnt++; if(s[i]=='c' && cnt >= 2) ans += C(cnt,2); } cout << ans << endl; return 0; }