#include <iostream>#include <cmath>using namespace std;
int main() { int i = 1, N; while ( cin >> N && N > 0 ) { cout << "Case " << i++ << ": " << ceil ( log2 ( N ) ) << endl; }}