#include<stdio.h>
#include<string.h>
int main()
{
    char S[20];
    int i=0,count=0;

    gets(S);
    while(S[i] != '\0')
    {
        if(S[i] >= '0' && S[i] <= '9')
            count++;
        i++;
    }

    if(count<9)
    {
        printf("0");
    }
    else if(count>9)
    {
        printf("%d",count-9);
    }

return 0;
}
