import sys N, S, K = map(int, input().split()) D = S - N * (N - 1) * K // 2 if D < 0: print(0) sys.exit() elif D == 0: print(1) sys.exit() mod = 10 ** 9 + 7 from functools import lru_cache @lru_cache(maxsize=None) def dfs(a, x): # a:割り振り数、b:min数、x:残り人数、返り値パターン数%mod global mod ans = 0 if x == 2: return a//2 + 1 for i in range(a // x + 1): ans = (ans + dfs(a - i * x, x - 1)) % mod #print(a,b,x,ans) return ans print(dfs(D, N))