#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 17, INF = 1e9 + 5;
struct Tree {
  int mx[2 * N];
  void change(int v, int a) {
    v += N;
    mx[v] = a;
    while (v != 1) {
      v /= 2;
      mx[v] = max(mx[2 * v], mx[2 * v + 1]);
    }
  }
  int query(int va, int vb) {
    va += N;
    vb += N;
    int res = max(mx[va], mx[vb]);
    while (va / 2 != vb / 2) {
      if (va % 2 == 0) res = max(res, mx[va + 1]);
      if (vb % 2 == 1) res = max(res, mx[vb - 1]);
      va /= 2;
      vb /= 2;
    }
    return res;
  }
};
int a[N], dp[N];
Tree mx, mn, dpmn;
int main() {
  int n, s, l;
  scanf("%d%d%d", &n, &s, &l);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  for (int i = 0; i < n; ++i) {
    mx.change(i, a[i]);
    mn.change(i, -a[i]);
    dpmn.change(i, -INF);
  }
  if (l == 1)
    dp[0] = 1;
  else
    dp[0] = INF;
  dpmn.change(0, -dp[0]);
  for (int i = 1; i < n; ++i) {
    if (i >= l - 1) {
      if (mx.query(0, i) + mn.query(0, i) <= s) {
        dp[i] = 1;
        dpmn.change(i, -dp[i]);
        continue;
      }
    }
    int lo = -1, hi = i, mid;
    while (lo + 1 < hi) {
      mid = (lo + hi) / 2;
      if (mx.query(mid, i) + mn.query(mid, i) <= s)
        hi = mid;
      else
        lo = mid;
    }
    if (hi > i - l + 1)
      dp[i] = INF;
    else
      dp[i] = 1 - dpmn.query(hi - 1, i - l);
    if (dp[i] > INF) dp[i] = INF;
    dpmn.change(i, -dp[i]);
  }
  if (dp[n - 1] != INF)
    printf("%d", dp[n - 1]);
  else
    printf("-1");
  return 0;
}
