#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) #define FOR(i,a,b) for(ll i = (a);i<(b);i++) #define REP(i,a) FOR(i,0,(a)) #define MP make_pair int main() { string str; cin >> str; int c = 0,w = 0; for(int i = 0;i < str.size();i++){ if(str[i] == 'c') c++; else w++; } cout << min(c, w) << endl; return 0; }