#include <bits/stdc++.h>
using namespace std;
priority_queue<long long, vector<long long>, greater<long long> > q;
long long a[300005];
vector<long long> v;
int main() {
  long long n, k, m;
  while (cin >> n >> k >> m) {
    for (long long i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (long long i = 2; i <= n; i++) {
      v.push_back(a[i] - a[i - 1] - 1);
    }
    sort(v.begin(), v.end());
    long long sum = a[n] - a[1] + 1;
    long long j = v.size() - 1;
    for (long long i = 1; i < m; i++) {
      sum -= v[j];
      j--;
    }
    cout << sum << endl;
  }
}
