def main(): from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum from heapq import heapify, heappop, heappush from bisect import bisect_left, bisect_right from copy import deepcopy import copy import random from collections import deque,Counter,defaultdict from itertools import permutations,combinations from decimal import Decimal,ROUND_HALF_UP #tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP) from functools import lru_cache, reduce #@lru_cache(maxsize=None) from operator import add,sub,mul,xor,and_,or_,itemgetter INF = 10**18 mod1 = 10**9+7 mod2 = 998244353 #DecimalならPython #再帰ならPython!!!!!!!!!!!!!!!!!!!!!!!!!! ''' dp O(N^2*D^2) もう一つ高速化がいる 累積和? ''' N,D,K = map(int, input().split()) dp = [[0]*(K+1) for _ in range(N+1)] dp[0][0] = 1 for i in range(1,N+1): for j in range(K): dp[i][j+1] += dp[i-1][j] if j+D+1 <= K: dp[i][j+D+1] -= dp[i-1][j] for j in range(1,K+1): dp[i][j] += dp[i][j-1] dp[i][j] %= mod1 print(dp[N][K]) if __name__ == '__main__': main()