#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long INFF = (long long)1e18;
struct node {
  long long ans = INFF, lazy = 0;
  void apply(int l, int r, long long val) { ans = val; }
};
struct segtree {
  node comb(node const &a, node const &b) {
    node res;
    res.ans = min(a.ans, b.ans);
    return res;
  }
  void push(int l, int r, int v) {
    if (tree[v].lazy == 0) return;
    tree[v << 1].lazy += tree[v].lazy;
    tree[v << 1 | 1].lazy += tree[v].lazy;
    tree[v << 1].ans += tree[v].lazy;
    tree[v << 1 | 1].ans += tree[v].lazy;
    tree[v].lazy = 0;
  }
  int sz;
  vector<node> tree;
  segtree(int _sz) {
    sz = 1;
    while (sz < _sz) sz <<= 1;
    tree.resize(2 * sz);
  }
  void build(vector<node> &init) {
    for (int i = 0; i < sz; ++i)
      if (i < init.size()) tree[i + sz] = init[i];
    for (int i = sz - 1; i > 0; --i)
      tree[i] = comb(tree[i << 1], tree[i << 1 | 1]);
  }
  node query(int l, int r) { return query0(l, r, 0, sz, 1); }
  node query0(int l, int r, int beg, int end, int v) {
    if (beg >= l && end <= r) return tree[v];
    push(beg, end, v);
    int mid = (beg + end) >> 1;
    node res;
    if (beg >= r || mid <= l)
      res = query0(l, r, mid, end, v << 1 | 1);
    else if (mid >= r || end <= l)
      res = query0(l, r, beg, mid, v << 1);
    else
      res = comb(query0(l, r, beg, mid, v << 1),
                 query0(l, r, mid, end, v << 1 | 1));
    return res;
  }
  template <typename... T>
  void upd(int l, int r, T... args) {
    upd0(l, r, 0, sz, 1, args...);
  }
  template <typename... T>
  void upd0(int l, int r, int beg, int end, int v, T... args) {
    if (beg >= r || end <= l) return;
    if (beg >= l && end <= r) {
      tree[v].apply(beg, end, args...);
      return;
    }
    push(beg, end, v);
    int mid = (beg + end) >> 1;
    upd0(l, r, beg, mid, v << 1, args...);
    upd0(l, r, mid, end, v << 1 | 1, args...);
    tree[v] = comb(tree[v << 1], tree[v << 1 | 1]);
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, s, l;
  cin >> n >> s >> l;
  vector<int> a(n);
  for (int i = (0); i < (n); i += (1)) {
    cin >> a[i];
  }
  vector<int> pv(n, -1);
  int pp = 0;
  multiset<int> se;
  for (int i = (0); i < (n); i += (1)) {
    se.insert(a[i]);
    while ((*se.rbegin() - *se.begin()) > s) {
      se.erase(se.find(a[pp]));
      pp++;
    }
    pv[i] = pp;
  }
  segtree dp(n + 1);
  dp.upd(0, 1, 0);
  for (int i = (1); i < (n + 1); i += (1)) {
    int left = pv[i - 1];
    int right = i - l + 1;
    if (right <= 0) continue;
    if (left >= right) continue;
    dp.upd(i, i + 1, dp.query(left, right).ans + 1);
  }
  long long ans = dp.query(n, n + 1).ans;
  if (ans >= INFF) {
    cout << "-1\n";
  } else {
    cout << ans << "\n";
  }
  return 0;
}
