program Project2; {$APPTYPE CONSOLE} uses SysUtils; var inp,outp: text; a: array[1..100000]of AnsiString; i,j,ans: longint; c: char; s: string; begin assign(inp,'count.in'); assign(outp,'count.out'); reset(inp); rewrite(outp); ans:=0; s:=''; while not eoln(inp)do begin read(inp,c); if pos(c,s)<>0 then begin s:=s+c; inc(ans); end; end; writeln(outp,ans); close(inp); close(outp); end.