Var t:text;
max:integer;
function Maxt(var t:text):integer;
var s:string;
max:integer;
begin;
max:=-280;
assign(t,'text.txt');
reset(t);
while not(Eof(t)) do
begin;
readln(t,s);
if length(s)>max then
max:=length(s);
end;
close(t);
Maxt:=max;
end;
begin;
max:=maxt(t);
writeln('Max:',max);
end.