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