1.


import java.io.*;

/**
* ACM Problem #11636 (Hello World)
*
* @author Felix Dietrich
* @version 1.0, 01/08/09
*
* Status : Accepted
*/
class Main
{
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

public static void main(String... args) throws IOException
{
String input;
int n;

while ((input = br.readLine()) != null)
{
if (input.length() < 1)
continue;

n = Integer.parseInt(input.trim());

if (n < 0)
return;
work(n);
}
}

static int casenumber = 1;

public static void work(int n) throws IOException
{
if(n==1)
{
printNumber(0);
return;
}

int pow;
for(pow=1; Math.pow(2, pow)<n; pow++);
printNumber(pow);
}

private static void printNumber(int i)
{
System.out.println(String.format("Case %d: %d", casenumber, i));
casenumber++;
}
}


2.

/**
* ACM Training, SS09, IFB 2C
* ACM Problem #11636 - Hello World!
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2683
*
* @author Doina Logofatu
* @version 1.0, 04/08/2009
*
* Method: Math
* Status : Accepted
* Runtime: 0.004
*/

#include <stdio.h>
#include <math.h>

int main(){

int n, counter = 0;

double loog2 = log(2);

while(scanf("%d", &n)==1 && n>0){

printf("Case %d: %d\n", ++counter, (int)ceil(log(n)/loog2) );
}

return 0;
}