An expedition must load exactly k crates onto a sled. Each of the n available crates has a positive integer mass, and crates are distinct even when two share the same mass. The total loaded mass must equal exactly T.
Count how many ways there are to choose exactly k crates whose masses sum to T. Two choices differ if they use a different set of crate positions.
Input format
Line 1: three integers n, k, and T.
Line 2: n space-separated positive integers, the crate masses.
Output format
A single integer: the number of ways to choose exactly k crates summing to T.
Constraints
- 1 <= n <= 16
- 0 <= k <= n
- 1 <= each mass <= 50
- 0 <= T <= 800