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