#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long, long long> &a, pair<long long, long long> &b) {
  if (a.second < b.second)
    return 1;
  else
    return 0;
}
signed main() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  priority_queue<long long, vector<long long>, greater<long long>> pq;
  long long ans = n, kk = n;
  for (long long i = 1; i < n; i++) pq.push(v[i] - v[i - 1]);
  while (kk > k) {
    long long x = pq.top();
    pq.pop();
    ans += x - 1;
    kk--;
  }
  cout << ans;
  return 0;
}
