#include <string>
#include <set>

using namespace std;

int main() {
    string str;
    set<char> setc;
    int cnt=0;
   
    while(cin>>str){
        
        for(int i = 0;i<str.size();i++){
            if(setc.count(str[i])!=1){
                setc.insert(str[i]);
            }
            
        }
        auto it =setc.begin();
        while(it!=setc.end()) cnt++,it++;
        cout<<cnt<<endl;
    }
    
    
}