#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (T e : v) {
    os << e << ' ';
  }
  return os;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> b(n);
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
  }
  ll total = b.back() - b.front() + 1;
  vector<int> diffs(n - 1);
  for (int i = 1; i < n; ++i) {
    diffs.emplace_back(b[i] - b[i - 1]);
  }
  sort(diffs.begin(), diffs.end(), greater<int>{});
  for (int i = 1; i < k; ++i) {
    total -= diffs[i - 1] - 1;
  }
  cout << total << '\n';
  return 0;
}
