l=int(input()) n=int(input()) w=list(map(int,input().split())) sum=0 count=0 w.sort() for i in range(n): sum+=w[i] if sum