#include <iostream>;
using namespace std;
int main(){
int n;
int number = 1;
while(cin >> n){
if(n < 0){
break;
}
int counter = 1;
int copy = 0;
while(counter < n){
counter *= 2;
copy++;
}
cout << "Case " << number << ": " << copy << endl;
number++;
}
return 0;
}