var
n, min : integer;
a : array [1..3] of byte;
begin
read (n);
a[1] := n div 100;
a[2] := n div 10 mod 10;
a[3] := n mod 10;
min := 1;
if a[2] < a[min] then min := 2;
if a[3] < a[min] then min := 3;
writeln (min);
end.
var
n, min : integer;
a : array [1..3] of byte;
begin
read (n);
a[1] := n div 100;
a[2] := n div 10 mod 10;
a[3] := n mod 10;
min := 1;
if a[2] < a[min] then min := 2;
if a[3] < a[min] then min := 3;
writeln (min);
end.