/* Solution to price is right by bob roos */ import java.io.*; import java.util.*; public class BG { public static int casenum; public static int G, L; public static BufferedReader in; public static int value() { int a[][] = new int[31][31]; int g,l; if (L > G) L = G; for (g = 1; g <= G; g++) a[0][g] = g; for (l = 1; l <= L; l++) { a[l][l] = a[l-1][l]; for (g = l+1; g <= G; g++) a[l][g] = 1 + a[l][g-1] + a[l-1][g-1]; } return a[L][G]; } public static void main(String[] args) throws Exception { in = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer tok; casenum = 0; while (true) { String line = in.readLine(); tok = new StringTokenizer(line); G = Integer.parseInt(tok.nextToken().trim()); L = Integer.parseInt(tok.nextToken().trim()); if (G <= 0) break; casenum++; System.out.println("Case " + casenum + ": " + value()); } } }