#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#define INF 111111
using namespace std;
int dp[10][101];
int Sum_of_Integers(int i,int sum,int v);
int main(){
  int n,s;
  while(1){
    cin >> n >> s;
    if(!n && !s)break;
    memset( dp , -1 , sizeof(dp) ); // -1で初期化
    int k = Sum_of_Integers( n , s , INF );
    if(k == 0){
      cout << k << endl;
    }else {
      cout << k << endl;
    }
  }
}
int Sum_of_Integers(int i,int sum,int v){
  int ret = 0;
  if(i < 0 || sum < 0)return 0;
  if(dp[i][sum] >= 0)return dp[i][sum];
  if(i == 0 && sum == 0)return 1;
  for(int j=sum;j>=0;j--){
    if(v>j)ret += Sum_of_Integers( i - 1 , sum - j , j );
  }
  return ret;
}