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