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