#include<stdio.h>
int main(){
int hash[128] = {0};
char chareacter;
while(chareacter!='\n'){
chareacter=getchar();
hash[chareacter] = 1;
}
int ans =0;
for (int i=0; i<128; i++){
if (hash[i] == 1){
ans+=1;
}
}
printf("%d", ans-1);
return 0;
}