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