#include <bits/stdc++.h>
using namespace std;
int a[650];
bool vis[650];
int main() {
  int m, t, r, i, j, k, ans = 0, x, z;
  bool b;
  scanf("%d %d %d", &m, &t, &r);
  int w[m + 2];
  for (i = 0; i < m; i++) scanf("%d", &w[i]);
  if (r > t) {
    cout << "-1" << endl;
    return 0;
  }
  for (i = 0; i < 650; i++) a[i] = 0;
  for (i = 0; i < 650; i++) vis[i] = false;
  for (i = m - 1; i >= 0; i--) {
    x = w[i] + 305;
    k = r;
    j = x - t;
    z = 0;
    b = false;
    while (k > 0) {
      if (a[x] >= r) {
        b = true;
        break;
      }
      if (vis[j] == true) {
        j++;
        continue;
      }
      if (j >= x && a[x] < r) {
        b = false;
        break;
      }
      vis[j] = true;
      a[j] += z;
      j++;
      z++;
      k--;
      if (a[x] + z >= r) {
        for (j; j <= x; j++) a[j] += z;
        b = true;
        break;
      }
    }
    if (b == false) break;
  }
  if (b == false)
    cout << "-1" << endl;
  else {
    for (i = 0; i < 650; i++) {
      if (vis[i]) ans++;
    }
    cout << ans << endl;
  }
  return 0;
}
