There are N sugars.Each piece of sugar has a weight Ni.10 is Greedy.He wanted him to be able to hold as much sugar.But,He can only take M weight things.Help him to find out the number of sugar he can hold.
输入
The input contains several test cases. Each test case starts with a line contains two numbers N and M(2<=N<=1000,2<=M<=500),The second line contains N integers.