#include <bits/stdc++.h>
const int N = 1e3 + 10;
int w[N], g[N], ans;
int main() {
  int n, t, r;
  scanf("%d%d%d", &n, &t, &r);
  for (int i = 1; i <= n; i++) scanf("%d", &g[i]);
  if (t < r) {
    puts("-1");
    return 0;
  }
  int temp, st, ed;
  for (int i = 1; i <= n; ++i)
    if (w[g[i]] <= r) {
      temp = r - w[g[i]];
      ans += temp;
      for (int j = g[i] + 1; j <= g[i] - temp + t; ++j) w[j] += temp;
      for (int j = g[i] - temp + t + 1; j <= g[i] + t - 1; ++j)
        w[j] += (--temp);
    }
  printf("%d\n", ans);
  return 0;
}
