#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  while (cin >> n >> m >> k) {
    vector<int> b(n), a(n - 1);
    for (int i = 0; i < n; ++i) cin >> b[i];
    long long tot = b[n - 1] - b[0] + 1;
    for (int i = 0; i < n - 1; ++i) a[i] = b[i + 1] - b[i];
    sort(a.begin(), a.end());
    int l = n - 2;
    while (--k) {
      tot -= a[l] - 1;
      --l;
    }
    cout << tot << '\n';
  }
  return 0;
}
