# import module import sys import math import numpy as np n , d , k = map(int,input().split()) mod = 1000000000 + 7 dp = [] [ dp.append( [0] * (k+1 )) for _ in range(n+1)] dp[0][0] = 1 for i in range(1,n+1): for j in range(k): for l in range(1,d+1): if j + l <= k: dp[i][j+l] += dp[i-1][j] else: break print(dp[n][k] % mod)