#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, k;
  cin >> n >> m >> k;
  long long b[n];
  pair<long long, long long> diff[n];
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    if (i) {
      diff[i - 1].first = b[i] - b[i - 1];
      diff[i - 1].second = i - 1;
    }
  }
  sort(diff, diff + n - 1);
  long long cnt = n;
  long long len = n;
  int i = 0;
  while (cnt > k) {
    len = len - 2 + diff[i].first + 1;
    i++;
    cnt--;
  }
  cout << len;
  return 0;
}
