#include <bits/stdc++.h>
using namespace std;
template <class T>
void db(T a) {
  cerr << a;
}
template <class L, class R>
void db(pair<L, R> a) {
  cerr << "(" << a.first << ", " << a.second << ")";
}
template <class T>
void db(vector<T> v) {
  cerr << "{";
  for (int i = 0; i <= (int)v.size() - 1; i++)
    cerr << (i != 0 ? ", " : ""), db(v[i]);
  cerr << "}";
}
template <class T>
void dump(const char *s, T a) {
  cerr << s << ": ";
  db(a);
  cerr << "\n";
}
template <class T, class... TS>
void dump(const char *s, T a, TS... x) {
  while (*s != ',') cerr << *s++;
  cerr << ": ";
  db(a);
  dump(s + 1, x...);
}
using LL = long long;
using PII = pair<int, int>;
using VI = vector<int>;
using VLL = vector<LL>;
using VVI = vector<VI>;
using VPII = vector<PII>;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  VI v(n);
  for (int i = 0; i <= n - 1; i++) cin >> v[i];
  int ans = v[n - 1] - v[0] + 1;
  VI a(n - 1);
  for (int i = 0; i <= n - 1 - 1; i++) a[i] = v[i + 1] - v[i] - 1;
  sort(a.rbegin(), a.rend());
  for (int i = 0; i <= k - 1 - 1; i++) ans -= a[i];
  cout << ans << "\n";
}
