St Andrews Online Judge

EZ Bar

By Kay Akashi

Time: 1000 ms
Memory: 256000 kB

The code judging system is only available during contests. Check out the github repo for test cases and solutions.

Please log in.

Problem Statement

In order to strengthen his biceps brachii muscles, Kay is coming to the gym today. Kay now wants to use an EZ bar, a wavy bar to whose right and left ends he can add some weights. He holds this bar with both his arms, and flexes arms to build his muscles.

Today he wants to make the total weight 2T2T kg. Luckily, he has found one weight of TT kg for the left end immediately. However, it seems that other TT kg weights are all unavailable, hence he needs to take several other available weights so that the total weight for the right end becomes TT kg too. In choosing weights, he wants to minimise the number of weights he has to take because he is too lazy to walk back and forth. Being horrible at maths, he asks his smart friend Alden to calculate the minimal number of weights he needs to take to make the total weight for the right end exactly TT kg. Report his answer.

Available weights are given as WW which is a single sequence of length NN; W1W_1, …, WNW_N.

Also, if it's impossible to make TT kg out of WW, output 1-1 instead.

Constraints

1N1001 \leq N \leq 100, 1Wi1001 \leq W_i \leq 100, 0T1040 \leq T \leq 10^{4}. There's no ii such that Wi=TW_i = T (1iN)(1 \leq i \leq N).

Subtask 1 (20%)

1N101 \leq N \leq 10.

Subtask 2 (80%)

1N1001 \leq N \leq 100.

Input

The first line of input contains two integers, NN, TT. The second line of input contains NN integers, WiW_i (1iN)(1 \leq i \leq N).

Output

Output an answer in a single line.

Examples

Input

5 16
2 4 4 8 10

Output

3

Explanation

One example of the solution is to pick up W2W_2, W3W_3, and W4W_4. Another example is to pick up W1W_1, W2W_2, and W5W_5. However, because there's no way to make 1616 by picking up only 22 or 11 elements, the minimal number of weights Kay needs to take is 33.

Input

4 20
1 10 18 11

Output

-1

Explanation

Even Alden cannot find a set of weights to make TT kg out of this sequence. Thus, the answer is 1-1.