#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> v(n), c(n - 1);
  for (int i = 0; i < n; i += 1) cin >> v[i];
  for (int i = 0; i < n - 1; i += 1) c[i] = v[i + 1] - v[i] - 1;
  sort(c.begin(), c.end());
  int ans = n;
  for (int i = 0; i < n - k; i += 1) {
    ans += c[i];
  }
  cout << ans;
  return 0;
}
