#include #define rep(i,n) for (int (i) = 0; (i) < (n); i++) #define ll long long using namespace std; int main(){ int n, k; int a[110]; cin >> n >> k; rep(i,n){ cin >> a[i]; } sort(a,a+n,greater()); int ans=a[0]; for(int i=0;i0){ ans += a[i]; } } cout << ans << endl; }