Sequences#8551

Sequences

1 second
128 megabytes
Easy

Count the number of all non-decreasing sequences of length containing integers from to , where every element can occur at most times.

Input

Three integers and k~(0 < n, m, k < 31).

Output

Print the number of described sequences.

Examples

The sequences are: (1, 1, 2), (1, 1, 3), (1, 1, 4), (1, 2, 2), (1, 2, 3), (1, 2, 4), (1, 3, 3), (1, 3, 4), (1, 4, 4), (2, 2, 3), (2, 2, 4), (2, 3, 3), (2, 3, 4), (2, 4, 4), (3, 3, 4), (3, 4, 4).

Example 1

Loading
Loading