1. 

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* Problem: 11636 Hello World!
*
* @author Robert Reichart
* @version 1.0
*
* Status : Accepted
* Runtime: 0.396
*/

import java.util.*;

class Main{
public static void main(String... args){
Scanner in = new Scanner (System.in);
int i = in.nextInt();
int u=1;
while (i>=0){
double log2=Math.floor(Math.log(i)/Math.log(2));
if (Math.pow(2, log2)<i){
log2+=1;
}
System.out.println("Case " + u + ": " + (int)log2);
u++;
i=in.nextInt();
}
}
}