#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int a[n + 1];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  vector<long long int> b;
  for (long long int i = 1; i < n; i++) {
    long long int temp = a[i] - a[i - 1] - 1;
    b.push_back(temp);
  }
  sort(b.rbegin(), b.rend());
  long long int ans = a[n - 1] - a[0] + 1;
  for (long long int i = 0; i < k - 1; i++) {
    ans = ans - b[i];
  }
  cout << ans << endl;
}
