#include "bits/stdc++.h" using namespace std; const char en = '\n'; using ll = long long; using ull = unsigned long long; int main() { int l,n,result=0; cin>>l>>n; priority_queue,greater> in; { int j; for(int i=0;i>j; in.push(j); } } int sum=0; while(!in.empty()){ sum+=in.top(); in.pop(); result++; if(sum>l){ result--; break; } } cout<