'use strict';

var fs = require('fs');
var contents = fs.readFileSync('/dev/stdin', 'utf-8');

var printTest = function(contents) {
    var a = contents.trim().split("\n");
    for (var i = 0; i < a.length; i++) {
        var n = parseInt(a[i]);
        if (n === 0) {
            break;
        }
        console.log("Case " + i + ": " + n);
    }
}

printTest(contents);