#c22906. Magic Gems

Magic Gems

Magic Gems

Problem Source

Codeforces 1117D.

Problem Description

Reziba has an infinite number of magic gems, each of size 11 unit. Each magic gem can be decomposed into mm ordinary gems, each also of size 11 unit.

Now Reziba needs to choose some magic gems and decompose some of them, so that the resulting gems exactly fill nn units of space. How many different selection-and-decomposition schemes are there? Output the answer modulo 109+710^9 + 7. (Two schemes are considered different if the number of chosen magic gems differs, or if the magic gems decomposed differ in their positions within the sequence.)

Input Format

The first line contains two integers n,mn, m.

Output Format

Output one integer — the answer modulo 109+710^9 + 7.

Sample Input

4 2

Sample Output

5

Constraints

For 100%100\% of the test cases, 1≤n≤10181 \le n \le 10^{18} and 2≤m≤1002 \le m \le 100.