#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, t, r;
  int w;
  vector<int> V;
  cin >> m >> t >> r;
  cin >> w;
  for (int j = r; j > 0; j--) V.push_back(w - j);
  for (int i = 0; i < m; i++) {
    int j;
    for (j = 0; j < r; j++)
      if (V[V.size() - 1 - j] + t < w) break;
    if (j < r) {
      if (V[V.size() - 1] >= w - (r - j)) {
        cout << -1 << endl;
        return 0;
      }
      for (int k = w - (r - j); k < w; k++) V.push_back(k);
    }
    if (i < m - 1) cin >> w;
  }
  cout << V.size() << endl;
  return 0;
}
