The Iditarod Trail Sled Dog Race (ITSDR) is coming up, and a rather unexpected competitor rolls up to the starting line... Farmer John! Of course, unlike the average ITSDR contestant, Farmer John employs the help of his cows instead of dogs. Farmer John realizes that, since cows are a bit lazy and hard to motivate compared to dogs, he may need quite a lot of them to ensure his victory in the race.
So, he decides to appoint his favorite cow, Bessie, to form a team for him. Farmer John's farm contains an infinite number of cows of two types: spotted and brown. Any two cows of the same type are indistinguishable. Bessie is tasked with selecting a total of $$$N$$$ cows to form an ordered team. Farmer John considers a team "good" if there are no consecutive sequences of spotted cows of length $$$K$$$ or greater. For example, if Bessie suggests a team that looks like "BSSSB" and $$$K = 2$$$, then Farmer John would not consider this team good because there are $$$3$$$ spotted cows in a row.
The day before the race, Farmer John provides Bessie with the values of $$$N$$$ and $$$K$$$. Since she is so short on time, Bessie asks you to come up with an efficient algorithm to calculate the number of "good" teams that she could form under the given constraints. Note that two teams are considered distinct if the cows at least one position differ in type. Since the number of "good" teams may be unfathomably large, Farmer John would simply like to know the answer modulo $$$10^9 + 7$$$.
The input will consist of a single line containing two integers, $$$N$$$ and $$$K$$$ ($$$1 \leq K \leq N \leq 10^6$$$).
Output a single integer representing the number of "good" teams modulo $$$10^9 + 7$$$.
5 3
24
6 2
21