#include using namespace std; int main(){ int n,k; cin >> n >> k; int ans=0; vector a(101,0); for(int i=0;i> a[i]; } sort (a.begin(),a.end()); reverse (a.begin(),a.end()); for(int i=0;i0){ ans += a[i]; } } cout << ans << endl; }