uses crt;
const n=100;
var a:array[char] of boolean;
i,c:integer;k:char;
begin
c:=0;
clrscr;
for i:=1 to n do begin
k:=readkey;
write(k);
if k = '.' then break;
if a[k] = false then begin
                a[k]:= true;
                c:=c+1;
end;
end;
writeln;
write(c);
readln;
end.