#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  vector<int> temp;
  for (int i = 1; i < n; i++) {
    int val = arr[i] - arr[i - 1] - 1;
    temp.push_back(val);
  }
  sort(temp.begin(), temp.end());
  long long int ans = arr[n - 1] - arr[0] + 1;
  for (int i = 1; i < k; i++) {
    ans = ans - temp[n - 1 - i];
  }
  cout << ans << endl;
}
