//#pragma GCC optimize("unroll-loops,Ofast")
//#pragma GCC target("sse,sse2,avx,avx2")

#include <bits/stdc++.h>

#define int long long
using namespace std;

//mt19937 rnd(time(0));
void solve() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    std::sort(a.rbegin(), a.rend());
    int ans = n;
    for (int i = 0; i < k; ++i) {
        ans += a[i];
    }
    cout << ans;
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int _ = 1;
    //cin>>_;
    while (_--) {
        solve();
    }
    return 0;
}
