#000042

z-bankar

This time Mr. Little Z has found a job as a banker. The first customer to come was a nervous woman that wanted the money she was getting from the bank in as few banknotes as possible.


Help Mr. Little Z, so he won't be beaten by his first customer.


Input The first line of the standard input has two numbers N and K. N represents the number of different banknotes Mr. Little Z has (1 <= N <= 100). The number K represents the amount of money the woman wants to get from the bank (1 <= K <= 50000). The next N lines contain the values of each banknote (the value of every banknote is less than 1000). Mr. Little Z has "infinite" number of banknotes of each type.

OutputTo the standard output write one number that represents the minimum number of banknotes with which Mr. Little Z can pay the sum. If Mr. Little Z cannot pay the woman with the given banknotes, then output -1.

Input:
2 20
1
3

Output:
8

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.