#include <bits/stdc++.h>
using namespace std;
int a[100005], n, s, l, range[100005];
struct node {
  int ans;
} tree[4 * 100005];
node merge(node l, node r) {
  node res;
  res.ans = min(l.ans, r.ans);
  return res;
}
void build(int v, int start, int end) {
  if (start == end)
    tree[v].ans = 1e9;
  else {
    int mid = (start + end) >> 1;
    build(2 * v, start, mid);
    build(2 * v + 1, mid + 1, end);
    tree[v] = merge(tree[2 * v], tree[2 * v + 1]);
  }
}
node query(int v, int start, int end, int l, int r) {
  if (r < 0 or r < l) return tree[4 * 100004];
  if (l == start and r == end) return tree[v];
  int mid = (start + end) >> 1;
  if (r <= mid) return query(2 * v, start, mid, l, r);
  if (l > mid) return query(2 * v + 1, mid + 1, end, l, r);
  return merge(query(2 * v, start, mid, l, mid),
               query(2 * v + 1, mid + 1, end, mid + 1, r));
}
void update(int v, int start, int end, int idx, int val) {
  if (start > idx or end < idx) return;
  if (start == end) {
    tree[v].ans = val;
    return;
  }
  int mid = (start + end) >> 1;
  update(2 * v, start, mid, idx, val);
  update(2 * v + 1, mid + 1, end, idx, val);
  tree[v] = merge(tree[2 * v], tree[2 * v + 1]);
}
multiset<int> bag;
bool check() {
  int x = *bag.begin();
  int y = *bag.rbegin();
  return (y - x <= s);
}
int main() {
  scanf("%d", &n);
  scanf("%d", &s);
  scanf("%d", &l);
  tree[0].ans = 0, tree[4 * 100004].ans = 1e9;
  build(1, 1, n);
  int L = 1;
  for (int(i) = (1); (i) <= (n); (i)++) {
    scanf("%d", &a[i]);
    bag.insert(a[i]);
    while (!check()) {
      bag.erase(bag.find(a[L]));
      L += 1;
    }
    if (i - L + 1 >= l)
      range[i] = i - L + 1;
    else
      range[i] = 0;
  }
  for (int(i) = (1); (i) <= (n); (i)++) {
    int val;
    if (range[i] == i)
      update(1, 1, n, i, 1);
    else
      val = query(1, 1, n, i - range[i], i - l).ans + 1,
      update(1, 1, n, i, val);
  }
  int ret = query(1, 1, n, n, n).ans;
  if (ret > n)
    printf("%d\n", -1);
  else
    printf("%d\n", ret);
  return 0;
}
