#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int len[100005];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  for (int i = 2; i <= n; i++) len[i] = arr[i] - arr[i - 1];
  sort(len + 2, len + n + 1);
  int ans = arr[n] - arr[1] + k;
  for (int i = 0; i < k - 1; i++) ans -= len[n - i];
  cout << ans << endl;
}
