#include <bits/stdc++.h>
using namespace std;
const int inf = 2e9 + 10;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
int a[N], r[N], n, k, len, b[N << 2] = {0};
void build(int node, int L, int R) {
  b[node] = inf;
  if (L == R) return;
  build(node * 2, L, (L + R) / 2);
  build(node * 2 + 1, (L + R) / 2 + 1, R);
}
void update(int node, int L, int R, int M, int val) {
  if (L > M || R < M) return;
  if (L == R && L == M) {
    b[node] = min(b[node], val);
    return;
  }
  update(node * 2, L, (L + R) / 2, M, val);
  update(node * 2 + 1, (L + R) / 2 + 1, R, M, val);
  b[node] = min(b[node * 2], b[node * 2 + 1]);
}
int query(int node, int L, int R, int l, int r) {
  if (L > r || R < l) return inf;
  if (l <= L && R <= r) return b[node];
  return min(query(node * 2, L, (L + R) / 2, l, r),
             query(node * 2 + 1, (L + R) / 2 + 1, R, l, r));
}
void solve() {
  a[0] = inf;
  priority_queue<pair<int, int> > ma, mi;
  ma.push(pair<int, int>(a[n], n));
  mi.push(pair<int, int>(-a[n], n));
  for (int R = n, L = n; R >= len; R--) {
    while (1LL * ma.top().first + mi.top().first <= k) {
      L--;
      ma.push(pair<int, int>(a[L], L));
      mi.push(pair<int, int>(-a[L], L));
    }
    r[R] = L;
    while (ma.top().second >= R) ma.pop();
    while (mi.top().second >= R) mi.pop();
  }
  build(1, 0, n);
  update(1, 0, n, 0, 0);
  for (int i = len; i <= n; i++)
    if (r[i] <= i - len) update(1, 0, n, i, query(1, 0, n, r[i], i - len) + 1);
  int ans = query(1, 0, n, n, n);
  if (ans >= inf)
    printf("-1");
  else
    printf("%d", ans);
}
int main() {
  scanf("%d%d%d", &n, &k, &len);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  solve();
}
