import std.stdio; import std.conv, std.array, std.algorithm, std.string; import std.math, std.random, std.range, std.datetime; import std.bigint; void main(){ string s = readln.chomp; int x, y; foreach(c; s){ if(c == 'c') x += 1; else if(c == 'w') y += 1; } int a = x - 1; int b = y; int ans; if(a < b) ans = a; else ans = b; ans.writeln; }