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

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


        i++;
    }

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


           return 0;


}
