#P299. 练50.2 卡牌游戏 II

练50.2 卡牌游戏 II

Description

Xiaoming is playing a card game. He has nn cards, each with a positive integer aia_i written on it, representing the damage value of the card. When played, the card reduces the enemy's health by aia_i. The enemy's health is bb, and Xiaoming wins when the enemy's health becomes less than or equal to 00.
Xiaoming must use the cards in order to deal damage to the enemy. He wants to know how many cards he needs to use to win. If he cannot win even after using all cards, output 1-1.

Input Format

The first line contains two positive integers nn and bb (1n1051≤n≤10^5, 1b10181≤b≤10^{18}), representing the number of cards and the enemy's health.
The second line contains nn positive integers aia_i (1ai1091≤a_i≤10^9), representing the damage value of each card. Xiaoming will use the cards in the order they are read.

Output Format

Output a single line containing an integer, representing the number of cards Xiaoming needs to use. If he cannot defeat the enemy even after using all cards, output 1-1.

Sample

3 5
2 3 4
2