#include <iostream>
using namespace std;
int main() {
string str;
getline(cin,str);
size_t lenght=0;
for(auto e:str){
if(e>='A'&&e<='z')
lenght++;
if(e==' ')
lenght=0;
}
cout<<lenght<<endl;
}
// 64 位输出请用 printf("%lld")


京公网安备 11010502036488号