#include <bits/stdc++.h>
const int mod = 1e9 + 7;
const int N = 1e6 + 7;
const long double PI = acos(-1.0);
using namespace std;
inline void read(int &first) {
  first = 0;
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    first = first * 10 + c - '0';
    c = getchar();
  }
  first *= f;
}
int n, b[N], ans = 0, m, k;
priority_queue<int> q;
int main() {
  read(n);
  read(m);
  read(k);
  --k;
  for (int i = 1; i <= n; ++i) read(b[i]);
  for (int i = 2; i <= n; ++i) q.push(b[i] - b[i - 1] - 1);
  ans = b[n] - b[1] + 1;
  while (k-- > 0 && !q.empty()) {
    ans -= q.top();
    q.pop();
  }
  printf("%d\n", ans);
}
