#include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { string a; cin >> a; int m = a.length() / 2; if (a.length() % 2) m++; int c = 0, l =0; for (int i = 0; i < a.length(); i++) { if (a[i] == 'c' && a[i + 1] == 'c' && a[i+2] == 'w') { l = i+1; } } c = 0; int r = 0; for (int i = a.length() - 3; i >= 0; i--) { if (a[i] == 'c' && a[i + 1] == 'c' && a[i + 2] == 'w') { r = a.length() - i - 2; } } int mx = min(l, r); cout << mx << endl; return 0; }