#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, t, r, w;
  cin >> m >> t >> r;
  vector<int> v1, v2;
  cin >> w;
  for (int i = w - r; i < w; i++) v1.push_back(i);
  int res = v1.size();
  int ip = 0;
  int cnt = 0;
  for (int i = 0; i < v1.size(); i++) {
    if (v1[i] + t >= w) cnt++;
  }
  if (cnt < r) ip = 1;
  for (int i = 1; i < m; i++) {
    cin >> w;
    int sec = -1;
    cnt = 0;
    for (int i = 0; i < v1.size(); i++) {
      if (v1[i] + t >= w) v2.push_back(v1[i]), sec = v1[i];
    }
    int diff = v2.size();
    diff = r - diff;
    for (int i = max(w - diff, sec + 1); i < w; i++) v2.push_back(i), res++;
    for (int i = 0; i < v2.size(); i++)
      if (v2[i] + t >= w) cnt++;
    if (cnt < r) ip = 1;
    v1 = v2;
    v2.clear();
  }
  if (ip) {
    cout << "-1\n";
    return 0;
  }
  cout << res << "\n";
  return 0;
}
