#include #include #include #include using namespace std; int main() { string s; cin >> s; vector ans; int flag = 0,tester = 0; for(int i = 0;i < s.length();i++){ if(s[i] == 'c'){ tester = 1; flag = 1; } else if(flag == 1 && s[i] == 'w'){ flag = 2; } else if(flag == 2 && s[i] == 'w'){ ans.push_back(tester); flag = 0; } if(flag > 0)tester++; } sort(ans.begin(), ans.end(),greater()); if(ans.size() == 0)cout << -1 << endl; else cout << ans[0] << endl; return 0; }