#include <bits/stdc++.h>
const int inf = 0x7fffffff;
const int maxn = 5005;
const int mod = 1000000007;
using namespace std;
int a[maxn], d[maxn], c[maxn];
int main() {
  int m, t, r, i, j;
  while (~scanf("%d%d%d", &m, &t, &r)) {
    memset(d, 0, sizeof(d));
    memset(c, 0, sizeof(c));
    for (i = 0; i < m; i++) scanf("%d", &a[i]);
    sort(a, a + m);
    if (t < r) {
      cout << "-1" << endl;
      continue;
    } else {
      int res = r;
      d[0] = a[0] + t - r;
      for (i = 1; i < r; i++) d[i] = d[i - 1] + 1;
      for (i = 1; i < m; i++) {
        int cnt = 0;
        for (j = 0; j < r; j++) {
          if (d[j] < a[i]) {
            res++;
            cnt++;
            d[j] = a[i] - cnt + t;
          }
        }
      }
      cout << res << endl;
    }
  }
}
