#include<stdio.h>
#include<string.h>
int main()
{
	char Ebarat[51];
	int n=0, i;
	printf ("Ebarat-ha ra vared konid : \n");
	for(;;)
	{
		scanf("%s", Ebarat);
		if(strcmp(Ebarat, "TAMAM") == 0)
			break;
		for(i = 0; Ebarat[i] != NULL; i++)
			if(Ebarat[i] >= '0' && Ebarat[i] <= '9')
				n++;
	}
	printf("Tedad Horof adadi = %d", n);
	getch();
}

