#include <bits/stdc++.h>
using namespace std;
int q[555555];
int main() {
  int n, t, r, a[11111];
  scanf("%d%d%d", &n, &t, &r);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    a[i] += 400;
  }
  sort(a, a + n);
  int ans = 0;
  bool ok = true;
  int s = 0, e = 0;
  bool vis[11111];
  memset(vis, 0, sizeof(vis));
  for (int i = 0; i < n; i++) {
    if (e > s) sort(q + s, q + e);
    while (s < e) {
      if (q[s] + t < a[i])
        s++;
      else
        break;
    }
    if (e - s >= r) continue;
    for (int j = a[i] - 1; j >= 0 && j + t >= a[i]; j--) {
      if (j < 0)
        while (1)
          ;
      if (vis[j]) continue;
      vis[j] = 1;
      q[e++] = j;
      ans++;
      if ((e - s) == r) break;
    }
    if (e - s < r) {
      ok = false;
      break;
    }
  }
  if (ok)
    printf("%d\n", ans);
  else
    printf("-1\n");
  return 0;
}
