#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int k, n, m;
  cin >> k >> n >> m;
  vector<long long int> v(k);
  for (long long int i = 0; i < k; i++) {
    cin >> v[i];
  }
  vector<pair<long long int, pair<long long int, long long int>>> v1;
  for (long long int i = 1; i < k; i++) {
    long long int diff = v[i] - v[i - 1];
    v1.push_back({diff, {i - 1, i}});
  }
  sort(v1.begin(), v1.end());
  long long int x = k;
  long long int len = k;
  long long int j = 0;
  while (x > m) {
    x = x - 1;
    len = len + v1[j].first - 1;
    j++;
  }
  cout << len << endl;
  ;
  return 0;
}
