Battery Pack Merging


Your device needs at least TT total charge before it can turn on.

You have nn battery packs, and the ii-th pack provides cic_i units of charge. Each pack can be used at most once, and you may merge any collection of packs together. It is allowed for the total charge to be more than TT.

What is the minimum number of battery packs needed to reach at least TT total charge? If even using every battery pack is not enough, output -1.

Input

The first line contains two integers nn and TT.

The second line contains nn integers c1,c2,…,cnc_1, c_2, \ldots, c_n, where cic_i is the charge of the ii-th battery pack.

Output

Output a single integer: the minimum number of battery packs needed to reach at least TT total charge, or -1 if it is impossible.

Constraints

  • 1≤n≤2×1051 \le n \le 2 \times 10^5
  • 1≤T≤10141 \le T \le 10^{14}
  • 1≤ci≤1091 \le c_i \le 10^9

Example 1

Input 1
5 12
3 8 4 5 2
Output 1
2
Explanation

Using the packs with charge 88 and 55 gives a total of 1313, so two packs are enough.

Example 2

Input 2
4 20
6 4 5 3
Output 2
-1
Explanation

All four packs together only give 1818 total charge.

Example 3

Input 3
2 10
9 9
Output 3
2
Explanation

One pack is not enough, but both packs together give 1818 total charge.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.