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