/* Solution to price is right by bob roos
*/
#include <stdio.h>

int casenum;
int G, L;

int value()
{
  int a[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];
}


int main(void)
{
  casenum = 0;
  while (scanf("%d %d",&G, &L) && G > 0)
  {
    casenum++;
    printf("Case %d: %d\n",casenum,value());
  }
  return 0;
}

