#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int n, maxdiff, minlen;
int x[100000];
int minprev[100000];
int f[100001];
int mx[100000], mxhead, mxtail;
int mn[100000], mnhead, mntail;
int q[100000], qhead, qtail;
void run() {
  scanf("%d%d%d", &n, &maxdiff, &minlen);
  for (int i = (0); i < (n); ++i) scanf("%d", &x[i]);
  mxhead = mxtail = mnhead = mntail = 0;
  minprev[0] = 0;
  mx[mxhead++] = 0;
  mn[mnhead++] = 0;
  for (int i = (1); i < (n); ++i) {
    minprev[i] = minprev[i - 1];
    while (mxtail < mxhead && x[i] >= x[mx[mxhead - 1]]) --mxhead;
    mx[mxhead++] = i;
    while (mntail < mnhead && x[i] <= x[mn[mnhead - 1]]) --mnhead;
    mn[mnhead++] = i;
    while (x[mx[mxtail]] > x[i] + maxdiff) {
      if (mx[mxtail] >= minprev[i]) minprev[i] = mx[mxtail] + 1;
      ++mxtail;
    }
    while (x[mn[mntail]] < x[i] - maxdiff) {
      if (mn[mntail] >= minprev[i]) minprev[i] = mn[mntail] + 1;
      ++mntail;
    }
  }
  qhead = qtail = 0;
  f[0] = 0;
  for (int i = (1); i <= (n); ++i) {
    if (i - minlen >= 0 && f[i - minlen] != INT_MAX) {
      while (qtail < qhead && f[q[qhead - 1]] >= f[i - minlen]) --qhead;
      q[qhead++] = i - minlen;
    }
    while (qtail < qhead && q[qtail] < minprev[i - 1]) ++qtail;
    f[i] = qtail < qhead ? f[q[qtail]] + 1 : INT_MAX;
  }
  int ret = f[n];
  printf("%d\n", ret == INT_MAX ? -1 : ret);
}
int main() {
  run();
  return 0;
}
