#include<bits/stdc++.h> using namespace std; int main() { string s; int a=0; for(int i=0;(cin>>s[i])!=0;i++) { if(s[i]!=' ') { a++; } } cout<<a; }