#include<iostream> #include<math.h> using namespace std; int main() { char s; int t=0; while((s=getchar())!='\n') { if(s!=' ') { t++; } } cout<<t; }