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