uva494 Kindergarten Counting Game
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=0;
char a;
int flag=1;
while((scanf("%c",&a)!=EOF))
{
if(a>='a'&&a<='z'||a>='A'&&a<='Z')
{
flag=1;
}
else{if(flag) n++;flag=0;}
if(a=='\n') {cout<<n<<endl;n=0;}
}
return 0;
}