#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  std::cout.precision(12);
  int n, m, k;
  cin >> n >> m >> k;
  int a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<pair<int, int>> v;
  for (long long i = 1; i < n; i++) {
    v.push_back({a[i] - a[i - 1], i});
  }
  sort(v.rbegin(), v.rend());
  vector<int> ans;
  ans.push_back(0);
  for (long long i = 0; i < k - 1; i++) {
    ans.push_back(v[i].second);
  }
  sort(ans.begin(), ans.end());
  long long sum = 0;
  ans.push_back(n);
  for (long long i = 0; i < k; i++)
    sum = sum + (a[ans[i + 1] - 1] - a[ans[i]] + 1);
  cout << sum;
}
