while s = gets
    n, m, r = s.split.map(&:to_i)
    dp_cur = Array.new(r + 1, 0)
    sum_cur = Array.new(r + 2, 0)
    dp_cur[0] = 1
    (0..r).each {|i| sum_cur[i + 1] = sum_cur[i] + dp_cur[i]}
    n.times do
        dp_next = Array.new(r + 1, 0)
        sum_next = Array.new(r + 2, 0)
        (m..r).each do |i|
            dp_next[i] = sum_cur[i - m + 1] 
        end
        (0..r).each do |i|
            sum_next[i + 1] = sum_next[i] + dp_next[i]
        end
        dp_cur, dp_next = dp_next, dp_cur
        sum_cur, sum_next = sum_next, sum_cur
    end
    puts dp_cur[r]
end