#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int a[n + 5];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 2; i <= n; i++) {
    a[i - 1] = a[i] - a[i - 1] - 1;
  }
  sort(a + 1, a + n + 1);
  long long int c = n;
  for (int i = 1; i <= n - k; i++) {
    c += a[i];
  }
  cout << c;
}
