#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int n, m, k;
  cin >> n >> m >> k;
  int minlength{n};
  if (k >= n) {
    cout << n;
    return 0;
  }
  int b[n], diff[n - 1];
  for (int i{0}; i < n; i++) {
    cin >> b[i];
    if (i > 0) {
      diff[i - 1] = b[i] - b[i - 1];
    }
  }
  int booga = sizeof(diff) / sizeof(diff[0]);
  sort(diff, diff + booga);
  for (int j{0}; j < (n - k); j++) {
    minlength += diff[j] - 1;
  }
  cout << minlength;
  return 0;
}
