#include <bits/stdc++.h>
const long long MOD = 1000000007;
const long long BIG = 1000000;
const long long inf = 1LL << 62;
const int base = 1000000000;
const int base_digits = 9;
using namespace std;
int h[BIG];
vector<int> adj[BIG];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  long long sum = 0;
  vector<int> v;
  int a[n], ev = 0, od = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i >= 1) {
      v.push_back((a[i] - a[i - 1]));
    }
  }
  sort(v.begin(), v.end(), greater<int>());
  if (k >= n) {
    cout << n;
  } else {
    int y = 1;
    while (y != k) {
      y++;
    }
    for (int i = y - 1; i < v.size(); i++) {
      sum += v[i];
    }
    sum += k;
    cout << sum;
  }
  return 0;
}
