#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, t, r, a, z;
  int arr[1050] = {0};
  cin.sync_with_stdio(false);
  int count = 0;
  int flag = 0;
  cin >> m >> t >> r;
  for (int i = 0; i < m; i++) {
    cin >> a;
    a += 350;
    z = r - arr[a];
    for (int j = 1; j <= z; j++) {
      count++;
      for (int k = 0; k < t; k++) {
        arr[a - j + k + 1]++;
      }
    }
    if (arr[a] != r) {
      flag = -1;
    }
  }
  if (flag == -1)
    cout << "-1";
  else
    cout << count;
  return 0;
}
