#include int main(void) { int BoxW,N,BlockW[10000],i; scanf("%d%d",&BoxW,&N); for(i=0;i BlockW[j] ){ temp= BlockW[i]; BlockW[i]=BlockW[j]; BlockW[j]=temp; } } } int total=0; int count=0; for(i=0;i