#include #include #include #include #include #include #define loop while(1) #define SZ(x) ((int)(x).size()) #define tep(i,n) for(int i=0, i##_len=(n); i #define vveci vector #define veci64 vector using namespace std; int main() { int l,n; veci w; int tmp; cin>>l>>n; tep(i,n){ cin>>tmp; w.pushb(tmp); } sort(w.begin(),w.end()); int score =0; int num=0; while(score<=l && num