#include <bits/stdc++.h>
using namespace std;
const int N = 110000;
int n, m, k;
int a[N];
int b[N];
int ans = 0;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  if (k == n) {
    cout << n << endl;
    return 0;
  }
  for (register int i = 1; i <= n; i++) cin >> a[i];
  for (register int i = 2; i <= n; i++) b[i - 1] = a[i] - a[i - 1];
  sort(b + 1, b + n);
  for (register int i = 1; i <= n - k; i++) ans += b[i];
  cout << ans + k << endl;
  return 0;
}
