import std.stdio, std.array, std.conv, std.string, std.algorithm, std.math, std.regex; void main(){ string s; s = readln().chomp(); int cwln = -1; foreach(elm; matchAll(s, regex("c[^cw]*?w[^w]*?w"))){ if(cwln < to!(int)(elm.hit.length))cwln=to!(int)(elm.hit.length); } cwln.writeln(); } // 読み込み用 T readOne(T=size_t)(){ return readln().chomp().split[0].to!T(); } T[] readLine(T=size_t)(string op=" "){ T[] ol; foreach(string elm; readln().chomp().split(op)){ ol ~= elm.to!T(); } return ol; }