#include #include #include #include #include #include #include using namespace std; int main(){ vector data; int ans=0,n,m; cin>>n>>m; for(int i=0;i>a; data.push_back(a); } sort(data.begin(),data.end()); int c = 0; while(m>=data[c]&&c!=n){ ans++; m-=data[c]; c++; } cout<