#include <bits/stdc++.h>
int dx[4] = {0, -1, 0, 1};
int dy[4] = {1, 0, -1, 0};
using namespace std;
int m, t, r;
set<int> st;
vector<int> w;
int Main() {
  ios_base::sync_with_stdio(0);
  cin >> m >> t >> r;
  if (r > t) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < int(m); ++i) {
    int x;
    cin >> x;
    w.push_back(x);
  }
  sort(w.begin(), w.end());
  int need = 0;
  for (int v : w) {
    while (st.begin() != st.end() && (*st.begin()) + t <= v)
      st.erase(st.begin());
    int let = r - int(st.size());
    for (int i = 0; i < int(let); ++i) {
      need++;
      st.insert(v - i);
    }
  }
  cout << need << endl;
  return 0;
}
int main() { return Main(); }
