#include <bits/stdc++.h>
using namespace std;
const long long MX = 5000, PLUS = 1000;
long long n, m, i, j, t, x, r, otv, nd, a[MX], gou[MX], mark[MX];
bool ans = true;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> m >> t >> r;
  for (i = 0; i < m; i++) {
    cin >> a[i];
    a[i] += PLUS;
    x = a[i] - 1;
    nd = r - mark[a[i]];
    for (; nd;) {
      while (gou[x]) x--;
      gou[x] = 1;
      otv++;
      for (j = x + 1; j <= x + t; j++) {
        mark[j]++;
      }
      if (x + t < a[i]) {
        ans = false;
        break;
      } else {
        nd--;
      }
    }
    if (!ans) break;
  }
  (ans) ? cout << otv : cout << -1;
  return 0;
}
