var f1,f2:text; n,n1:int64; a:array[1..10] of byte; c,i,j:integer; k:byte; begin assign(f1,'count.in'); reset(f1); readln(f1,n); close(f1); a[1]:=1; a[2]:=2; a[3]:=3; a[4]:=4; a[5]:=5; a[6]:=6; a[7]:=7; a[8]:=8; a[9]:=9; a[10]:=0; k:=0; if n=0 then k:=k+1; if n>36000 then begin n1:=n1 div 10000; n:=n mod 10000; end; while n<>0 do begin c:=n mod 10; n:=n div 10; for j:=1 to 10 do begin if c=a[j] then begin k:=k+1; a[j]:=25; end; end; end; while n1<>0 do begin c:=n1 mod 10; n1:=n1 div 10; for j:=1 to 10 do begin if c=a[j] then begin k:=k+1; a[j]:=25; end; end; end; assign(f2,'count.out'); rewrite(f2); writeln(f2,k); close(f2); end.