Program textFind;
uses StrUtils;
var text,buffer : String;
var tpos,lastpos,counter,biggest : Integer;
begin
tpos := 0;
text := '';
while(tpos = 0) do begin
readln(buffer);
text += buffer;
tpos := pos('.',buffer)
end;
lastpos := 1;
tpos := PosEx(' ',text,lastpos);
if tpos = 0 then
tpos := PosEx('.',text,lastpos);
biggest := tpos-1; lastpos := tpos+1;
while(not (tpos = 0)) do begin
tpos := PosEx(' ',text,lastpos);
if tpos = 0 then
tpos := PosEx('.',text,lastpos);
if (tpos-lastpos) > biggest then
biggest := tpos-lastpos;
lastpos := tpos+1;
end;
lastpos := 1; counter := 0;
tpos := PosEx(' ',text,lastpos);
if tpos = 0 then
tpos := PosEx('.',text,lastpos);
while(not (tpos = 0)) do begin
if (tpos-lastpos) = biggest then
counter += 1;
lastpos := tpos + 1;
tpos := PosEx(' ',text,lastpos);
if tpos = 0 then
tpos := PosEx('.',text,lastpos);
end;
writeln(counter);
end.