#include <bits/stdc++.h>
using namespace std;
int n, k, m;
int pos[100010];
int d[100010];
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) cin >> pos[i], d[i - 1] = pos[i] - pos[i - 1];
  sort(d + 1, d + 1 + n - 1);
  int x = pos[n] - pos[1] + 1;
  for (int i = n - 1; i > (n - 1) - (k - 1); i--) {
    x -= (d[i] - 1);
  }
  cout << x;
}
