#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, l, k, a, ans;
  cin >> n >> l >> k;
  vector<int> v, x;
  if (k == n) {
    cout << n << "\n";
    return;
  }
  while (n--) {
    int val;
    cin >> val;
    v.push_back(val);
  }
  n = v.size();
  ans = v[n - 1] - v[0] + 1;
  for (int i = 0; i < n - 1; i++) {
    x.push_back((v[i + 1] - v[i]));
  }
  sort(x.rbegin(), x.rend());
  for (int i = 0; i < k - 1; i++) {
    ans -= (x[i] - 1);
  }
  cout << ans << "\n";
}
int main() {
  solve();
  return 0;
}
