Bob has three integers

.
For a non-negative integer sequence

, we denote the weight of it is:
Now Bob wants to know the sum of the weight of all of the sequences

which satisfies the following conditions:
1.
2.
If the answer is irreducible fraction

, you need to output an integer

in

which satisfies

.
It's guaranteed that

.