#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  int arr[(int)1e5 + 5];
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  vector<int> vec;
  for (int i = 2; i <= n; i++) vec.push_back(arr[i] - arr[i - 1]);
  sort(vec.begin(), vec.end());
  long long res = arr[n] - arr[1] + 1;
  int bad = k - 1;
  for (int i = vec.size() - 1; i >= 0 && bad > 0; i--) {
    res -= vec[i] - 1;
    bad--;
  }
  printf("%lld\n", res);
  return 0;
}
