#include <iostream>
using namespace std;
int main()
{
string str;
getline(cin, str);
int count = 0;
for (int i = 0; i < str.length(); i++)
{
if (str.at(i) == ' ')
{
i++;
}
else
{
while (str.at(i) != ' ')
{
i++;
if (str.at(i) == str.length())
{
break;
}
}
count++;
}
}
cout << "number of words are : " << count;
}