vari,k,l:integer;s:string;beginreadln(s);k:=0;i:=1;while i<length(s) dobegin l:=0; while (s[i]<>' ') and (i<length(s)) do begin l:=l+1; i:=i+1; end; i:=i+1; if l>k then k:=l;end;writeln(k);end.
var
i,k,l:integer;
s:string;
begin
readln(s);
k:=0;
i:=1;
while i<length(s) do
begin
l:=0;
while (s[i]<>' ') and (i<length(s)) do
begin
l:=l+1;
i:=i+1;
end;
i:=i+1;
if l>k then k:=l;
end;
writeln(k);
end.