#include<stdio.h>
int main()
{
int Cas = 1 ,n;
while(~scanf("%d" ,&n) && n >= 0)
{
printf("Case %d: " ,Cas ++);
int now = 1 ,Ans = 0;
while(now < n)
{
Ans ++;
now *= 2;
}
printf("%d\n" ,Ans);
}
return 0;
}