#include <string.h>
#include <fstream>
using namespace std;
const int INT=1000000;
ifstream in("text.in");
ofstream out("text.out");
bool litera(char s){
if(('a'<=s && s<='z') || ('A'<=s && s<='Z')) return 1;
return 0;
}
int main(){
char s[INT];
int nr,cuvinte,c;
nr=0;cuvinte=0;
while(in.get(s,1000000)){
c=0; // cuvant nou.
for(int i=0;s[i]!=0;i++)
if(litera(s[i])==1){
nr++; // numarul de caractere creste.
if(c==0){ // daca e inceputul unui cuvant.
c=1;cuvinte++;
}
}
else c=0;
}
out<<nr/cuvinte;
}