i=input L=int(i()); i() W=sorted(map(int,i().split())) c,w=0,0 while c