#include<stdio.h>
int main()
{
char c[100];int j=1;int i;
gets(c);
for(i=0;;i++)
if(('a'<=c[i]&&c[i]<='z')||('A'<=c[i]&&c[i]<='Z')) break;
for(;;i++)
{if(c[i]==' ') j++;
if(c[i]='\0') break;
i++;
}
printf("There are %d words in the line.\n",j);
return 0;
}