#include <iostream>
#include <vector>
using namespace std;

int main(void){
  const int V = 10, W = 100, C = 10;
  // dp[j][k]: ??¢?????????i?????§??§???k????????¢?????????????????£????????????????¨????j??????????????????????????????????????°
  // (i????????????)
  vector<vector<int> > dp(W + 1, vector<int>(C + 1, 0));
  dp[0][1] = 1;
  for(int i = 1; i < V; i++){
    for(int j = W; j >= i; j--){
      for(int k = 1; k <= C; k++){
        dp[j][k] += dp[j - i][k - 1];
        if(j == i && k == 1){ ++dp[j][k]; }
      }
    }
  }

  while(true){
    int n, s;
    cin >> n >> s;
    if(n == 0 && s == 0){ break; }
    cout << dp[s][n] << endl;
  }
  
  return 0;
}