#include<string.h>
int main() {
    int n, m = 0;
    char s[100] = {0};
    gets(s);
    n = strlen(s);
    for (int i = 0; i < n; i++) {
        if (s[i] == 32) m++;
    }
    printf("%d", n - m);
    return 0;
}