#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
template <typename T>
int ex(const T& x) {
  return (cout << x), 0;
}
int ex() { return 0; }
int main() {
  int n, l, k;
  cin >> n >> l >> k;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<int> d(n - 1);
  for (int i = 1; i < n; i++) d[i - 1] = v[i] - v[i - 1];
  sort(d.begin(), d.end());
  reverse(d.begin(), d.end());
  int total = 0;
  for (int i = 0; i < k - 1; i++) total += d[i] - 1;
  int ans = v[n - 1] - v[0] - total + 1;
  cout << ans;
}
