#include<bits/stdc++.h> using namespace std; int main(){ char a[100]; int b=0; gets(a); for(int i=1;i<=strlen(a);i++){ if(a[i]!=32)b++; } cout<<b; }