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