#include<stdio.h>
#include<string.h>
#define A 888
main()
{
int a,b,c=0,d,e=0,f,g;
char one[A];
gets (one);
a=strlen(one);
for (b=1;b<=a;b++)
if ((one[b]==32&&one[b-1]!=32)||(one[b]==0&&one[b-1]!=32)) c++;
printf("%d",c);
}
#include<string.h>
#define A 888
main()
{
int a,b,c=0,d,e=0,f,g;
char one[A];
gets (one);
a=strlen(one);
for (b=1;b<=a;b++)
if ((one[b]==32&&one[b-1]!=32)||(one[b]==0&&one[b-1]!=32)) c++;
printf("%d",c);
}