#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, t, r;
  cin >> m >> t >> r;
  int w[m];
  for (int i = 0; i < m; i++) cin >> w[i];
  sort(w, w + m);
  int ans = 0;
  queue<int> light;
  int used[1000];
  memset(used, 0, sizeof(used));
  for (int i = m - 1; i >= 0; i--) {
    while (light.size() != 0 && light.front() >= w[i]) {
      light.pop();
    }
    int lsize = light.size();
    int startPos = w[i] - t + (r - light.size()) - 1;
    if (startPos >= w[i] || used[500 + startPos] == 1) {
      cout << -1 << endl;
      return 0;
    }
    for (int j = 0; j < r - lsize; j++) {
      light.push(startPos - j);
      used[500 + startPos - j] = true;
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
