#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
inline T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    long long int t = bigmod(p, e / 2, M);
    return (T)((t * t) % M);
  }
  return (T)((long long int)bigmod(p, e - 1, M) * (long long int)p) % M;
}
inline long long int mod(long long int a, long long int m) {
  return (a % m + m) % m;
}
void brain_fuck() {
  long long int n, m, i, k, res = 0;
  cin >> n >> m >> k;
  vector<int> diff;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    if (i) {
      diff.push_back(v[i] - v[i - 1]);
    }
  }
  sort(diff.begin(), diff.end());
  for (i = 0; i <= diff.size() - k; i++) {
    res += (diff[i]);
  }
  cout << res + k << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tc = 1;
  while (tc--) {
    brain_fuck();
  }
  exit(0);
}
