Uses crt;
var x,y,i,n,s,min:longint;
m:array[1..100] longint;
begin
clrscr;
readln(x);
i:=0;
while x<>0 do
begin
i:=i+1;
m[i]:=x mod 10;
x:=x div 10;
end;
min:=m[1];
if i<3 then writeln('Error') else<br>begin
for y:=1 to 3 do
if m[y]<=min then min:=m[y];<br>writeln(min);
end;
readln();
end.