#include<bits/stdc++.h> using namespace std; int main(){ char a;int s=0; while((a=getchar())!='\n') { if(a!=' ')s++; } cout<<s; return 0; }