#include <bits/stdc++.h>
using namespace std;
int m, t, r;
int main() {
  cin >> m >> t >> r;
  if (t < r) {
    cout << -1 << "\n";
    return 0;
  }
  set<int> curr_candles;
  int total_candles = 0;
  for (int i = 0; i < m; i++) {
    int w;
    cin >> w;
    curr_candles.erase(curr_candles.begin(),
                       curr_candles.lower_bound(w - t + 1));
    int candles_here = curr_candles.size();
    int candle_start = w;
    while (candles_here < r) {
      curr_candles.insert(candle_start);
      candle_start--;
      candles_here++;
      total_candles++;
    }
  }
  cout << total_candles << "\n";
  return 0;
}
