#include <bits/stdc++.h>
using namespace std;
const int maxn = 350;
const int eps = 1e-14;
priority_queue<int, vector<int>, greater<int> > q;
int a[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int m, t, r;
  cin >> m >> t >> r;
  if (t < r) {
    cout << "-1\n";
    return 0;
  }
  int sum = 0;
  while (sum < r) {
    q.push(-500);
    sum++;
  }
  sum = 0;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    int st = x - t;
    int ed = x - 1;
    while (!q.empty() && q.top() < st) {
      q.pop();
      q.push(ed);
      ed--;
      sum++;
    }
  }
  cout << sum << endl;
}
