http://ybt.ssoier.cn:8088/problem_show.php?pid=1978
/*
1978:【18NOIP普及组】标题统计 枚举算法
http://ybt.ssoier.cn:8088/problem_show.php?pid=1978
*/
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
getline(cin,s);
int ans=0;
if(s.length() >0 &&s[0]!=' ') ans++;
if(s.length() >1 &&s[1]!=' ') ans++;
if(s.length() >2 &&s[2]!=' ') ans++;
if(s.length() >3 &&s[3]!=' ') ans++;
if(s.length() >4 &&s[4]!=' ') ans++;
cout<<ans<<endl;
return 0;
}