#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100005;
int n, m, k;
int v[NMAX];
priority_queue<int> pq;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
    if (i >= 2) pq.push(v[i - 1] - v[i] - 1);
  }
  int best = n;
  int buc = n;
  while (buc > k) {
    best -= 2;
    --buc;
    best += -pq.top();
    pq.pop();
  }
  cout << best << "\n";
  return 0;
}
