#include<stdio.h>
int main()
{int k,n=0,word=0;
 char str[80];
 gets(str);
 for(k=0;str[k]!='\0';k++)
 if(str[k]==' ') word=0;
 else if(word==0)
 {word=1;
  n++;
 }
 printf("there are %d words in the line\n",n);
}
