#include<bits/stdc++.h>
using namespace std;
int main()
{
int ans;
string a;
int n=a.length();
for(int i=1;i<=n;i++)
{
cin>>a[i];
if(a[i]>='0'&&a[i]<='9')
ans++;
if(a[i]>='a'&&a[i]<='z')
ans++;
if(a[i]>='A'&&a[i]<='Z')
ans++;
cout<<ans<<endl;
}
return 0;
}