#00019A

z-football

Mr Z is a very big fan of football. He never misses to watch on TV the broadcast of his favourite team playing. One day, Little Z asked his father Mr Z to help him with his Math's homework. Eventhough he knew that the football match of his favourite team was about to start, he decided to help his son with his Math's homework because he knew that it will come handy for him when he grows up and decides to be a programmer.

After some time, he realised that the football match was about to end so he turned on the TV to see the result. The match has already finished by the time he turned on the TV. Eventhough he knew the end result (M:N), he wanted to know what was happening during the game, which team was leading at what moment. Because there are many different scenarios of how the match progressed, he asked you to write a program for him to count the number of ways the end result could be reached. You also know that the lead of any team during the game was never greater than K (K >= abs(M - N)).


For example, if the final result is 2:1, there are three possibilities for the progress of the game:
M=2, N=1, K=2
1) 1:0, 2:0, 2:1
2) 1:0, 1:1, 2:1
3) 0:1, 1:1, 2:1

But if K = 1, then the intermediate result 2:0 is not possible, so in this case there are only two solutions.
M=2, N=1, K=1
1) 1:0, 1:1, 2:1
2) 0:1, 1:1, 2:1

InputIn the first line are the numbers M,N and K (1<=M,N,K<=10000)

OutputThe output should contain one integer, the number of ways the end result could be reached. As this number could be very big, output the result modulo 1000007

Input
2 1 2
Output
3

Input
2 1 1
Output
2

Input
10 9 1
Output
512

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.