# your code goes here N,M=(int(i) for i in input().split()) C=[int(i) for i in input().split()] C.sort() i=0 S=0 while S