#include<iostream>
using namespace std;
int dp[31][31];
int main()
{
int m,n;
int cas = 1;
while(cin>>m>>n)
{
if(m == 0 && n == 0)
break;
int i,j;
for(i = 0 ; i <= m;i++)
dp[i][0] = i;
for(i = 0;i <= n;i++)
dp[0][i] = 0;
for(i = 1;i <= m;i++)
for(j = 1;j <= n;j++)
{
dp[i][j] = dp[i-1][j-1] + 1 + dp[i-1][j];
}
cout<<"Case "<<cas++<<": "<<dp[m][n]<<endl;
}
return 0;
}