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

int rec(const int& maxnum, int cnt, int mul, int foo) {
  if(cnt == 0) return mul == 0;
  if(foo > maxnum || mul < 0) return 0;
  return rec( maxnum, cnt - 1, mul - foo, foo + 1) + rec( maxnum, cnt, mul, foo + 1);
}

int main() {
  int a, b, c;
  while( cin >> a >> b >> c, a){
    cout << rec( a, b, c, 1) << endl;
  }
}