#include #include #include #include #include #define INF 1000000000; void Qsort(int x[], int left, int right); void swap(int x[],int i,int j); int main(void){ int l,n; scanf("%d %d",&l,&n); int w[n]; int i; for(i=0;i=0){ l=l-w[i]; i++; } printf("%d\n",i); return 0; } void Qsort(int x[], int left, int right){ int i,j; int pivot; i=left; j=right; pivot=x[(left+right)/2]; while(1){ while(x[i]=j) break; swap(x,i,j); i++; j--; } if(left