capa=int(input()) n=input() l = list(map(int,input().split())) l.sort() itr=-1 sum=0 while sum