#include<bits/stdc++.h>
using namespace std;
int main()
{
    int i,n,t=0;
    char a[999];
    gets(a);
    for(i=0;i<strlen(a);i++){
        if(a[i+1]==' '&&a[i]!=' ')
            t++;
    }cout<<t+1;
    return 0;
}
/**************************************************************
	Problem: 1106
	User: fuyijun
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/