#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string s;
int k=1;
getline(cin, s);
vector<string> words(1, "");
for (auto c: s)
if (c == ' ' || c==',' || c=='.'){
k++;
}
cout << k<< endl;
return 0;
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string s;
int k=1;
getline(cin, s);
vector<string> words(1, "");
for (auto c: s)
{
if (c == ' ' || c==',' || c=='.'){
k++;
}
}
cout << k<< endl;
return 0;
}