#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
int segs[N], c, fans;
bool f[N];
pair<int, pair<int, int> > p[N];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; ++i) {
    cin >> segs[i];
  }
  for (int i = 0; i < n - 1; ++i) {
    p[i].first = segs[i + 1] - segs[i];
    p[i].second.first = i;
    p[i].second.second = i + 1;
  }
  if (n == k) {
    cout << n;
    return 0;
  }
  if (k == 1) {
    cout << segs[n - 1] - segs[0] + 1;
    return 0;
  }
  sort(p, p + n);
  reverse(p, p + n);
  k--;
  while (k--) {
    f[p[c++].second.first] = 1;
  }
  puts("");
  for (int i = 0; i < n; ++i) {
    int curr = i;
    while (curr < n - 1 && f[curr] == 0) {
      curr++;
    }
    fans += (segs[curr] - segs[i] + 1);
    i = curr;
  }
  cout << fans;
  return 0;
}
