#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int a[100100];
vector<int> b;
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i < n; i++) b.push_back(a[i + 1] - a[i]);
  sort(b.rbegin(), b.rend());
  int ans = (a[n] - a[1] + 1);
  for (int i = 0; i < k - 1; i++) ans -= (b[i] - 1);
  cout << ans << endl;
  return 0;
}
