from functools import lru_cache @lru_cache(maxsize=2000000) def f(x, y): if x == 0: return 1 if y == 1: return 1 ret = 0 for i in range(x // y + 1): ret += f(x - i * y, y - 1) ret %= MOD print(x,y,ret) return ret MOD = 10 ** 9 + 7 N, S, K = map(int, input().split()) S -= K * (N - 1) * N // 2 if S < 0: print(0) exit() print(f(S, N))