#include <bits/stdc++.h>
using namespace std;
vector<long long int> v;
int main() {
  long long int n, m, k, len = 0;
  cin >> n >> m >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  len = a[n - 1] - a[0] + 1;
  for (int i = 0; i < n - 1; i++) {
    v.push_back(a[i + 1] - a[i] - 1);
  }
  sort(v.rbegin(), v.rend());
  int i = 0;
  k--;
  while (k && i < v.size()) {
    len -= v[i];
    k--;
    i++;
  }
  cout << len << endl;
  return 0;
}
