#include<stdio.h>
#include<stdlib.h>
int arr[101] = {0,}; // 0 means closed
void setArray(int cnt)
{
int i,j,temp;
for(i = 1; i<=cnt ; i++)
{
for(j = 1; j <=cnt ; j++)
{
if((j%i) == 0 ) arr[j] = 1- arr[j];
if(arr[j]) printf("O ");
else printf("C ");
}
printf("n");
}
}
void viewArray(int cnt)
{
int total = 0;
for(int i = 1 ; i<=cnt ; i++)
{
if(arr[i]) total++;
}
printf("%d",total);
}
int main()
{
int cnt;
puts("Enter Num 5~100");
scanf("%d",&cnt);
setArray(cnt);
viewArray(cnt);
return 0;
}