#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
vector<ll> pieces;
vector<ll> lucke;
int main() {
  ll n, m, k;
  ll b;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    cin >> b;
    pieces.push_back(b);
  }
  ll maxi = pieces[n - 1] - pieces[0] + 1;
  for (int i = 0; i < n - 1; i++) {
    lucke.push_back(pieces[i + 1] - pieces[i] - 1);
  }
  sort(lucke.begin(), lucke.end());
  for (int j = 0; j < k - 1; j++) {
    maxi -= lucke[n - j - 2];
  }
  cout << maxi << endl;
}
