class StrDemo
{
public static void main(String[] args)
{
int ZiMuNum=0;
int KongGeNum=0;
int ShuZiNum=0;
int QiTaNum=0;
Scanner sc = new Scanner(System.in);
StringBuffer Str = new StringBuffer(sc.nextLine());
for (int i = 0;i<Str.length() ; i++)
{
if (Str.codePointAt(i)==32)
{
KongGeNum++;
}
else if(Str.codePointAt(i)>47&&Str.codePointAt(i)<58)
{
ShuZiNum++;
}
else if (Str.codePointAt(i)>64&&Str.codePointAt(i)<123)