eval"L,N,*A="+$<.read.split*?, p A.sort.index{|i|0>L-=i}||N