#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 20, mm = 400;
int cnt[maxn];
int us[maxn];
int main() {
  int m, r, t;
  while (~scanf("%d%d%d", &m, &t, &r)) {
    if (t < r) {
      printf("-1\n");
      for (int i = 0; i < m; i++) scanf("%d", &t);
      continue;
    }
    memset(cnt, 0, sizeof cnt);
    memset(us, 0, sizeof us);
    int ans = 0;
    for (int i = 0; i < m; i++) {
      int w;
      scanf("%d", &w);
      int l = w - 1;
      while (cnt[w] < r) {
        if (us[l + mm] == 0) {
          for (int j = l + 1; j <= l + t; j++) cnt[j]++;
          us[l + mm] = 1;
          ans++;
        }
        l--;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
