#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
const int mod = 998244353;
const int maxn = 2e5 + 5;
const int inf = 1e9;
const long long onf = 1e18;
using namespace std;
int sum[maxn], a[maxn];
bool cmp(int x, int y) { return x > y; }
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  if (k >= n)
    printf("%d", n);
  else {
    for (int i = 1; i < n; i++) sum[i] = a[i + 1] - a[i] - 1;
    sort(sum + 1, sum + n, cmp);
    long long ans = a[n] - a[1] + 1;
    for (int i = 1; i < k; i++) ans -= sum[i];
    printf("%lld\n", ans);
  }
  return 0;
}
