#include <fstream>
#include <string>

using namespace std;

int main()
{
	ifstream input;
	ofstream output;

	input.open("DEMTU.inp");
	output.open("DEMTU.out");
	string a;
	long long count = 0;
	while (!input.eof())
	{
		input >> a;
		if (a != "\0")
		count++;
	}
	output << count;
	input.close();
	output.close();
	return 0;
}