dp = 20.times.map{ 10.times.map{ [0] * 156 } }


(1..20).each do |i|
  cnt = 0
  (1..i).each do |n|
    cnt.downto(1).each do |j|
      (1..155-n).each do |k|
        dp[i - 1][j][n + k] += dp[i - 1][j - 1][k]
      end
    end
    dp[i - 1][0][n] = 1
    cnt += 1 if cnt < 9
  end
end

loop do
  n, k, s = gets.split.map(&:to_i)
  break if n == 0
  p dp[n - 1][k - 1][s]
end