#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 100;
int n, m, k, ans;
int num[maxn];
int main() {
  ios::sync_with_stdio(false);
  while (scanf("%d%d%d", &n, &m, &k) != EOF) {
    ans = 0;
    for (int i = 0; i < n; ++i) {
      scanf("%d", &num[i]);
    }
    ans = num[n - 1] - num[0] + 1;
    for (int i = 0; i < n; ++i) {
      num[i] = num[i + 1] - num[i] - 1;
    }
    sort(num, num + n - 1);
    for (int i = 0; i < k - 1; ++i) {
      ans -= num[n - 2 - i];
    }
    printf("%d\n", ans);
  }
  return 0;
}
