import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### n,s,k = na() dp = [0] * (s+1) dp[0] = 1 mod = 10**9+7 for i in range(n): ndp = [0] * (s+1) dp,ndp = ndp,dp for j in range(s+1): if ndp[j] == 0: continue for x in range(k if i else 0, s+1): nj = j + x * (n - i) if nj > s: break dp[nj] += ndp[j] dp[nj] %= mod print(dp[-1])