At a bake-sale cash box you accept coins in n distinct denominations, with an unlimited supply of each. A customer owes exactly A units. Count the number of distinct ways to make exactly A using the coins, where two ways are considered the same if they use the same number of each denomination (order of handing over the coins does not matter). Making A = 0 has exactly one way: hand over no coins.
Input format
Line 1: two integers n and A.
Line 2: n space-separated distinct integers, the coin denominations.
Output format
A single integer: the number of distinct coin multisets that sum to exactly A.
Constraints
- 1 <= n <= 12
- 1 <= each denomination <= 100
- 0 <= A <= 300
- The answer fits in a 64-bit signed integer.