#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, t, s = 0;
  cin >> n >> m >> t;
  long long int a[n];
  long long int l1, l2;
  cin >> l1;
  for (long long int i = 1; i < n; ++i) {
    cin >> l2;
    a[i] = l2 - l1;
    l1 = l2;
  }
  sort(a + 1, a + n);
  for (long long int i = 1; i <= n - t; ++i) {
    s += a[i];
  }
  s += t;
  if (t >= n)
    cout << t;
  else
    cout << s;
}
