#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a[n];
  vector<int> v;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (i == 0) continue;
    v.push_back(a[i] - a[i - 1]);
  }
  v.push_back(0);
  sort(v.begin(), v.end());
  int ans = k;
  for (int i = 1; i <= n - k; ++i) {
    ans += v[i];
  }
  cout << ans;
}
