n,s,k = map(int, input().split()) mod = 10**9+7 s -= (n*(n-1)//2)*k if s <= 0: print(0) exit() dp = [ [1]*(s+1) for _ in range(n+1) ] for i in range(2, n+1): for j in range(s+1): if j >= i: dp[i][j] = (dp[i-1][j] + dp[i][j-i]) % mod else: dp[i][j] = (dp[i-1][j]) % mod print(dp[-1][-1])