#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
string line;
getline(cin,line);
stringstream ss(line);
string word;
int count=0;
while(ss>>word){
count++;
}
cout<<count<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4gCiNpbmNsdWRlIDxzdHJpbmc+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCQoJc3RyaW5nIGxpbmU7CglnZXRsaW5lKGNpbixsaW5lKTsKCXN0cmluZ3N0cmVhbSBzcyhsaW5lKTsKCQoJc3RyaW5nIHdvcmQ7CgkKCWludCBjb3VudD0wOwoJd2hpbGUoc3M+PndvcmQpewoJCWNvdW50Kys7Cgl9Cgljb3V0PDxjb3VudDw8ZW5kbDsKCXJldHVybiAwOwp9