#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[n], b[n - 1];
  cin >> a[0];
  long long sum = 0;
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    b[i - 1] = a[i] - a[i - 1];
  }
  sort(b, b + n - 1);
  long long i = n - 2;
  sum = a[n - 1] - a[0] + 1;
  for (int i = n - 2; i > max(n - 1 - k, 0ll); i--) sum -= b[i] - 1;
  if (k >= n) sum = k;
  cout << sum << " ";
  return 0;
}
