#include using namespace std; int main(){ int n,l,sum = 0;cin >>l >>n; vector a(n); for(int i = 0;i > a[i]; }sort(a.begin(),a.end()); int i = 0; while(sum <= l){ sum += a[i]; i++; }cout << i - 1 <