#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, m, k;
  cin >> n >> m >> k;
  vector<long> b(n);
  for (auto &e : b) {
    cin >> e;
  }
  vector<long> dist(n - 1);
  for (int i = 0; i < n - 1; ++i) {
    dist[i] = b[i + 1] - b[i] - 1;
  }
  sort(dist.begin(), dist.end());
  long total = b[n - 1] - b[0] + 1, subtract = 0;
  for (int i = 0; i < k - 1; ++i) {
    subtract += dist[n - 2 - i];
  }
  total = total - subtract;
  cout << total << "\n";
}
