L=int(input()) N=int(input()) W=input().split() W.sort() i=0 count=0 """ while L>=i: i+=int(W[count]) count+=1 """ for s in W: i+=int(W[count]) if L