#include #include #include int cmp(const void *a,const void *b){ if(*(int*)a>*(int*)b){return 1;} else if(*(int*)a<*(int*)b){return -1;} else {return 0;} } int main(void){ int n,m,c[15]; int emp=0; scanf("%d %d",&n,&m); for(int i=0;i=0){m=m-c[i];c[i]=0;emp++;} else{break;} } printf("%d\n",emp); }