#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  if (k >= n) {
    cout << n;
    return 0;
  }
  int b0, b1, b;
  cin >> b0;
  b = b0;
  for (int i = 0; i < n - 1; i++) {
    cin >> b1;
    a[i] = b1 - b0;
    b0 = b1;
  }
  sort(a, a + n - 1);
  reverse(a, a + n - 1);
  int s = b1 - b + 1;
  for (int i = 0; i <= k - 2; i++) s = s - a[i] + 1;
  cout << s << endl;
  return 0;
}
