#include <string.h>
#include <stdio.h>
#include <ctype.h>

int main() {
    char str[200];
    int count = 0;
    int onlyDigits = 1;
    
    fgets(str, sizeof(str), stdin);
    
    str[strcspn(str,"\n")] = '\0';
    
    for(int i=0; str[i] ! = '\0'; i++){
        if(str[i] == ' ')
        continue;
        
        if(!isdigit(str[i])) {
            onlyDigits = 0;
            break;
        }
    }
    if(onlyDigits && strlen(str) > 0) {
        
        printf("Invalid input");
        return 0;
    }

for(int i=0; str[i] ! = '\0'; i++){
    if(isalpha(str[i])){
        count++;
    }
}
printf("%d", count);
return 0;

}