program Project2; {$APPTYPE CONSOLE} uses SysUtils; var res,i,buf,code:longint; used:array[0..9]of boolean; ch:char; s:set of byte; begin for i:=0 to 9 do used[i]:=false; assign(input,'count.in'); reset(input); while not eoln do begin read(ch); buf:=ord(ch)-ord('0'); if buf in[0..9]then s:=s+[buf]; used[buf]:=true; end; close(input); for i:=0 to 9 do if i in s then inc(res); assign(output,'count.out'); rewrite(output); writeln(res); close(output); end.