- Time limit: 1.00 s
- Memory limit: 512 MB
Consider a money system consisting of coins. Each coin has a positive integer value. Your task is to produce a sum of money using the available coins in such a way that the number of coins is minimal.
For example, if the coins are and the desired sum is , an optimal solution is which requires coins.
Input
The first input line has two integers and : the number of coins and the desired sum of money.
The second line has distinct integers : the value of each coin.
Output
Print one integer: the minimum number of coins. If it is not possible to produce the desired sum, print .
Constraints
Example
Input:
3 11 1 5 7
Output:
3