/*
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
#include <stdio.h>
#include <string.h>
int main()
{
int i;
char str[100]={};
scanf("%s",str);
if(strcmp(str,"IOI")==0)
{
printf("IOI is the International Olympiad in Informatics.");
}
else
{
printf("I don't care.");
}
return 0;
}
#include <stdio.h>
#include <string.h>
int main()
{
int i,n=0;
char str[101]={};
gets(str);
for(i=0;str[i]!=NULL;i++)
{
if(str[i]=='l'&&str[i+1]=='o'&&str[i+2]=='v'&&str[i+3]=='e')
{
n++;
}
}
printf("%d",n);
return 0;
}
*/
#include <stdio.h>
#include <string.h>
int main()
{
int i,n=0,a=0;
char str[101]={};
scanf("%s",str);
for(i=0;str[i]!=NULL;i++)
{
if(str[i]=='c'||str[i]=='C')
{
n++;
if(str[i+1]=='c'||str[i+1]=='C')
{
a++;
}
}
}
printf("%d\n",n);
printf("%d",a);
return 0;
}