#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, k;
  cin >> n >> s >> k;
  vector<int> c;
  int a[100000];
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 1; i < n; ++i) c.push_back(a[i] - a[i - 1] - 1);
  int answer = a[n - 1] - a[0] + 1;
  sort(c.rbegin(), c.rend());
  for (int i = 0; i < k - 1; ++i) {
    answer -= c[i];
  }
  cout << answer;
}
