import java.util.Scanner;
public class Main
{
public static void main
(String[] args
) {
long n;
int differentDigitsCount = 0;
int[] digitsCount = new int[10];
Scanner scanner
= new Scanner
(System.
in);
n = scanner.nextLong();
while (n!=0)
{
digitsCount[(int)(n%10)]++;
n/=10;
}
for (int i = 0; i < 10; i++)
{
if (digitsCount[i] > 0) differentDigitsCount++;
}
System.
out.
println(differentDigitsCount
); }
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKcHVibGljIGNsYXNzIE1haW4KewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpCgl7CgkJbG9uZyBuOwoJCWludCBkaWZmZXJlbnREaWdpdHNDb3VudCA9IDA7CgkJaW50W10gZGlnaXRzQ291bnQgPSBuZXcgaW50WzEwXTsKCQlTY2FubmVyIHNjYW5uZXIgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCQoJCW4gPSBzY2FubmVyLm5leHRMb25nKCk7CgoJCXdoaWxlIChuIT0wKQoJCXsKCQkJZGlnaXRzQ291bnRbKGludCkobiUxMCldKys7CgkJCW4vPTEwOwoJCX0KCQlmb3IgKGludCBpID0gMDsgaSA8IDEwOyBpKyspCgkJewoJCQlpZiAoZGlnaXRzQ291bnRbaV0gPiAwKSBkaWZmZXJlbnREaWdpdHNDb3VudCsrOwoJCX0KCQkKCQlTeXN0ZW0ub3V0LnByaW50bG4oZGlmZmVyZW50RGlnaXRzQ291bnQpOwoJfQp9