Program n1;
var s,s1,s2: string;
function max(a,b,c: integer): integer;
begin
max:=0;
if (a>b) and (a>c) then max:=a else
if (b>c) and (b>a) then max:=b else
if (c>a) and (c>b) then max:=c;
end;
begin
readln(s);
readln(s1);
readln(s2);
write(max(length(s),length(s1),length(s2)));
end.