program count; var N,rez,a,b : integer; f,f1 : text; begin assign (f, 'count.in'); reset (f); read (f,N); close (f); begin if N mod 10<10 then if N mod 10>1 then a:=1; end; begin if N mod 100<100 then if N mod 100>10 then a:=2; end; begin if N mod 1000<1000 then if N mod 1000>100 then a:=3; end; assign (f1,'count.out'); rewrite (f1); write (f1,a); close (f1); end.