#include <bits/stdc++.h>
using namespace std;
int m, t, r, w[301], totans;
set<int> c;
bool check(int a) {
  if (a >= (*(c.rbegin()) - t + 1) && a <= *c.begin()) return true;
  return false;
}
bool arrange(int a) {
  auto it = c.lower_bound(a);
  int tmp = distance(c.begin(), it);
  c.erase(c.begin(), it);
  for (int i = 0; i < tmp; i++) c.insert(a - i + t - 1);
  if (c.size() < r) return false;
  totans += tmp;
  return true;
}
void code() {
  cin >> m >> t >> r;
  for (int i = 0; i < m; i++) cin >> w[i];
  for (int i = 0; i < r; i++) c.insert(w[0] - i + t - 1);
  if (!check(w[0])) {
    cout << -1 << '\n';
    return;
  }
  totans = r;
  for (int i = 1; i < m; i++) {
    bool ans = arrange(w[i]) && check(w[i]);
    if (!ans) {
      cout << -1 << '\n';
    }
  }
  cout << totans << '\n';
}
int main() {
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    code();
  }
}
