#include #include using namespace std; int main(){ int L,N; cin >> L >> N; priority_queue circle; for(int i=0 ; i> x; circle.push(x*-1); } int counter=0; while(L+circle.top()>=0){ L+=circle.top(); circle.pop(); counter++; } cout << counter << endl; }