#include <bits/stdc++.h>
using namespace std;

int N, S;
bool used[101];

int rec(int num, int cnt, int s) {

  if(num < 0 || s < 0 || used[num]) return 0;
  if(cnt == N) return s == 0;

  int ret = rec(num - 1, cnt, s);
  used[num] = true;
  ret += rec(s - num, cnt + 1, s - num);
  used[num] = false;
  return ret;
}

int main() {

  while(cin >> N >> S, N||S) {
    cout << rec(S, 0, S) << endl;
  }
}