import std; int calc(int n, int d, int k) { const MOD = 10^^9 + 7; auto dp = new int[][](n + 1, k + 1); dp[0][0] = 1; for (int i = 1; i <= n; i++) { for (int j = 0; j < k; j++) { for (int m = 1; m <= d; m++) { if (j + m > k) break; dp[i][j+m] = (dp[i][j+m] + dp[i-1][j]) % MOD; } } } return dp[n][k]; } void main() { int n, d, k; scan(n, d, k); writeln(calc(n, d, k)); } void scan(T...)(ref T a) { string[] ss = readln.split; foreach (i, t; T) a[i] = ss[i].to!t; } T read(T)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readint = read!int; alias readints = reads!int;