Lecture Gap


You are scheduling kk lectures on days 1,2,…,n1, 2, \ldots, n. Let xix_i be the day of the ii-th lecture. The days must satisfy

1≤x1,x2,…,xk≤n1 \le x_1, x_2, \ldots, x_k \le n

and consecutive lectures must be at least gg days apart:

xi+1≥xi+gx_{i+1} \ge x_i + g

for every ii. (In particular the sequence is automatically non-decreasing. If g=0g = 0, two lectures may share a day.)

Count the number of integer sequences xx that meet these conditions. Since the answer can be large, output it modulo 109+710^9 + 7.

Input

A single line containing three integers nn, kk, and gg.

Output

Print one integer: the number of valid lecture schedules, modulo 109+710^9 + 7.

Constraints

  • 1≤k≤1061 \le k \le 10^6
  • 1≤n≤1061 \le n \le 10^6
  • 0≤g≤1090 \le g \le 10^9

Example 1

Input 1
5 2 1
Output 1
10
Explanation

Consecutive lectures must fall on strictly later days. The valid pairs (x1,x2)(x_1, x_2) are all 1≤x1<x2≤51 \le x_1 < x_2 \le 5, and there are (52)=10\binom{5}{2} = 10 of them.

Example 2

Input 2
5 2 0
Output 2
15
Explanation

Now lectures may share a day, so the condition is 1≤x1≤x2≤51 \le x_1 \le x_2 \le 5. There are (5+2−12)=15\binom{5 + 2 - 1}{2} = 15 such pairs.

Example 3

Input 3
5 1 10
Output 3
5
Explanation

A single lecture can be placed on any of the 55 days. The gap gg is unused when k=1k = 1.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.