Pascal
var a, b, max:Integer;
begin
max:=0;
readln(a);
for b := 1 to 5 do begin
if max < (a mod 10) then
max:=a mod 10;
a:=a div 10;
end;
writeln(max);
end.
Pascal
var a, b, max:Integer;
begin
max:=0;
readln(a);
for b := 1 to 5 do begin
if max < (a mod 10) then
max:=a mod 10;
a:=a div 10;
end;
writeln(max);
end.