### constant

N = 20
K = 10
S = 155

### main

dp = Array.new(N + 1){Array.new(K + 1){Array.new(S + 1){0}}}
dp[0][0][0] = 1

for n in (1..N)
  for k in (0..K)
    for s in (0..S)
      dp[n][k][s] = dp[n - 1][k][s]
      dp[n][k][s] += dp[n - 1][k - 1][s - n] if k > 0 && s >= n
    end
  end
end
#p dp; exit

loop do
  n, k, s = gets.split.map(&:to_i)
  break if (n | k | s) == 0

  puts dp[n][k][s]
end