//TPrice.cpp
//prgmr: T Feil
//One-man Price is Right

#include <iostream.h>

int main(void){

  int N[31][31],  i, j, G, L, cases=1;

  for(i=1;i<31;i++){
    N[i][0]=i;
    N[1][i]=1;
  }
  for(i=2;i<31;i++) 
    for(j=1;j<31;j++)
      N[i][j] = 1 + N[i-1][j-1] + N[i-1][j];

  cin>>G>>L;
  while(G!=0 || L!=0){
    cout<<"Case "<<cases++<<": "<<N[G][L]<<endl;
    cin>>G>>L;
  }
  return 0;
}
    
