import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Arrays; import java.util.HashMap; import java.util.StringTokenizer; public class Main { static final int mod = 1000*1000*1000 + 7; static int dp[][]; static int n,s,k; public static int solve(int ind,int s) { //System.out.println(s); if (s < 0) { return 0; } if (ind == n) { return s == 0 ? 1 : 0; } if (dp[ind][s] != -1) { return dp[ind][s]; } int ret = 0; ret += solve(ind + 1,s); ret %= mod; ret += solve(ind,s - (n - ind)); ret %= mod; return dp[ind][s] = ret; } public static void main(String[]args) throws Throwable { Scanner sc = new Scanner(System.in); n = sc.nextInt(); s = sc.nextInt(); k = sc.nextInt(); dp = new int[n][s + 1]; for (int i = 0 ; i < n ; ++i) { s -= i * k; } for (int i = 0 ; i < n ; ++i) { Arrays.fill(dp[i], -1); } System.out.println(solve(0,s)); } static class Scanner { StringTokenizer st; BufferedReader br; public Scanner(InputStream s) { br = new BufferedReader(new InputStreamReader(s)); } public Scanner(String s) throws FileNotFoundException { br = new BufferedReader(new FileReader(new File(s))); } public String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); return st.nextToken(); } public int nextInt() throws IOException { return Integer.parseInt(next()); } public long nextLong() throws IOException { return Long.parseLong(next()); } public String nextLine() throws IOException { return br.readLine(); } public double nextDouble() throws IOException { return Double.parseDouble(next()); } public boolean ready() throws IOException { return br.ready(); } } }