#include<iostream>
#include<fstream>
#include<string.h>  
using namespace std;
int main ()
{
	char s[255];
	int a,b,c;
	ifstream f1; f1.open("DEMTU.INP");
	f1.getline(s,255);	
	f1.close();
	c=1;
	b=strlen(s);
	for(a=0;a<b;a++) if(s[a]==' ') c++;
	ofstream f2; f2.open("DEMTU.OUT");
	f2<<c;
	f2.close();
	return 0;
}
