#include <typeinfo>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <algorithm>

using namespace std;

int longitud(vector<int> vect);

int main() {
string name;
getline (cin,name);
vector<int> result;
stringstream s_stream(name);
while(s_stream.good()) {
string substr;
getline(s_stream, substr, ',');
int numero = stoi(substr);
result.push_back(numero);  
}
cout << longitud(result) << endl;
}
