#include <bits/stdc++.h>
using namespace std;
int T[200004];
int temp[200004];
int main() {
  int n, t, r;
  while (cin >> n >> t >> r) {
    for (int i = 0; i < n; i++) cin >> T[i], T[i] += 500;
    memset(temp, -1, sizeof temp);
    bool ok = true;
    int ct = 0;
    for (int i = 0; i < n && ok; i++) {
      int cant = 0;
      for (int j = T[i] - 1; j >= 0; j--) {
        if (temp[j] == -1) continue;
        if (j + t >= T[i]) cant++;
      }
      if (cant < r) {
        for (int j = T[i] - 1; j >= 0; j--) {
          if (temp[j] == -1) {
            if (j + t >= T[i]) cant++, ct++, temp[j] = j;
            if (cant == r) break;
          }
        }
        if (cant < r) ok = false;
      }
    }
    if (ok)
      cout << ct << endl;
    else
      cout << -1 << endl;
  }
}
