#include <bits/stdc++.h>
using namespace std;
int arr[100005], k, m, n;
bool check(int mid) {
  int low = arr[0], cnt = 0;
  for (int j = 1; j < n; j++) {
    if (arr[j] - low >= mid) {
      low = arr[j];
      cnt++;
      if (cnt >= k) return 0;
    }
  }
  return 1;
}
bool vis[100005];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> arr[i];
  vector<pair<int, int> > vc;
  for (int i = 1; i < n; i++) {
    vc.push_back({arr[i] - arr[i - 1], i});
  }
  sort(vc.begin(), vc.end());
  for (int i = vc.size() - 1, j = 1; i >= 0 && j < k; i--, j++) {
    vis[vc[i].second] = 1;
  }
  int low = arr[0], sum = 0;
  for (int j = 1; j < n; j++) {
    if (vis[j]) {
      sum += (arr[j - 1] - low + 1);
      low = arr[j];
    }
  }
  sum += (arr[n - 1] - low + 1);
  cout << sum << endl;
  return 0;
}
