#include <bits/stdc++.h>
using namespace std;
int b[100005];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  priority_queue<int> pq;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
    if (i > 1) pq.push(-(b[i] - b[i - 1] - 1));
  }
  int ans = n;
  for (int i = 1; i <= n - k; i++) {
    ans += -pq.top();
    pq.pop();
  }
  printf("%d\n", ans);
}
