/* package whatever; // don't place package name! */
import java.util.* ;
import java.lang.* ;
import java.io.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
{
Scanner in
= new Scanner
( System .
in ) ; s = in.next ( ) ;
for ( int j = 0 ; j < s.length ( ) ; j++ ) {
int i = j + 1 ;
while ( i< s.length ( ) )
{
if ( s.charAt ( j) == s.charAt ( i) && i!= j)
{
String s2
= s.
substring ( i
+ 1 ,s.
length ( ) ) ; s= s1.concat ( s2) ;
}
else i++;
}
}
System .
out .
println ( s.
length ( ) ) ; }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKICAgICAgICBTdHJpbmcgczsKICAgICAgICBzID0gaW4ubmV4dCgpOwoKICAgICAgICBmb3IgKGludCBqID0gMDsgaiA8IHMubGVuZ3RoKCk7IGorKykgewogICAgICAgICAgICBpbnQgaSA9IGogKyAxOwogICAgICAgICAgICB3aGlsZShpPCBzLmxlbmd0aCgpKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpZiAocy5jaGFyQXQoaikgPT0gcy5jaGFyQXQoaSkgJiYgaSE9IGopCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgU3RyaW5nIHMxPXMuc3Vic3RyaW5nKDAsIGkpOwogICAgICAgICAgICAgICAgICAgIFN0cmluZyBzMiA9IHMuc3Vic3RyaW5nKGkrMSxzLmxlbmd0aCgpKTsKICAgICAgICAgICAgICAgICAgICBzPXMxLmNvbmNhdChzMik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGkrKzsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4ocy5sZW5ndGgoKSk7Cgl9Cn0=