#include <bits/stdc++.h>
using namespace std;
int d[100010];
int main() {
  int n, m, k, re, i;
  cin >> n >> m >> k;
  if (n == 1) {
    cout << 1 << endl;
    exit(0);
  }
  int b, h, l, temp;
  re = m;
  temp = n - 2;
  cin >> h;
  re -= (h - 1);
  for (i = 0; i <= temp - 1; i++) {
    cin >> b;
    d[i] = b - h;
    h = b;
  }
  cin >> l;
  re -= (m - l);
  d[temp] = l - h;
  sort(d, d + temp + 1);
  for (i = temp; i > temp - k + 1; i--) {
    re -= (d[i] - 1);
  }
  cout << re << endl;
  return 0;
}
