#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <functional>

const int MAX_N = 9;
const int MAX_S = 1000;
const int MAX_X = 100;
int N, S;
long long dp[MAX_N + 2][MAX_S + 2][MAX_X + 1 + MAX_N];

void solve(){
    dp[0][0][0] = 1;

    for(int i = 0; i < MAX_N + 1; ++i){
        for(int j = 0; j < MAX_S + 1; ++j){
            for(int k = 0; k < MAX_X + 1; ++k){
                dp[i + 1][j][k] += dp[i][j][k];
                dp[i + 1][j + 1][k + i] += dp[i][j][k];
            }
        }
    }
    return;
}

int main(){
    solve();
    while(true){
        std::cin >> N >> S;
        if(N == 0 && S == 0)
            break;
        std::cout << dp[9][N][S] << std::endl;
    }
    return 0;
}