#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
using namespace std;

int main(){
	int idx = 1;
	int answer = 0;
	while(1){
		int answer = 0;
		int l, p, v;
		cin >> l >> p >> v;
		if(l==0 && p==0 && v==0) break;
		
		while(1){
			if(v>=p){
				v = v-p;
				answer += l;
			}else{
				if(v!=0){
					answer += v;
				}
				break;
			}
		}
		
		cout << "Case " << idx++ << ": " << answer << endl;
	}
	
	return 0;
}