#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v, second;
  set<pair<int, pair<int, int>>> s;
  set<pair<int, pair<int, int>>>::iterator it, io;
  int n, m, k;
  cin >> n >> m >> k;
  int d = n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  for (int i = 0; i < v.size() - 1; i++) {
    int x = v[i + 1] - v[i];
    second.push_back(x);
    s.insert({x, {i, i + 1}});
  }
  sort(second.begin(), second.end());
  int ans = v[v.size() - 1] - v[0] + 1;
  reverse(second.begin(), second.end());
  for (int i = 0; i < k - 1; i++) ans = ans - second[i] + 1;
  cout << ans << endl;
}
