#include <bits/stdc++.h>
using namespace std;
template <typename T, typename L>
bool smax(T &x, L y) {
  return x < y ? (x = y, true) : false;
}
template <typename T, typename L>
bool smin(T &x, L y) {
  return y < x ? (x = y, true) : false;
}
void modify(int, int, int, int, int);
bool get(int, int);
int query(int, int, int, int, int);
const int MAXN = 1e5 + 15;
const int LOG = 20;
int tree[MAXN << 2];
int dp[MAXN], mn[LOG][MAXN], mx[LOG][MAXN];
int n, l, k;
int a[MAXN], lg2[MAXN];
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cerr << "HELLO WORLD :)\n";
  cin >> n >> k >> l;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mn[0][i] = mx[0][i] = a[i];
  }
  for (int i = 1; i < LOG; i++)
    for (int j = 1; j <= n; j++) {
      mn[i][j] = min(mn[i - 1][j], mn[i - 1][j + (1 << (i - 1))]);
      mx[i][j] = max(mx[i - 1][j], mx[i - 1][j + (1 << (i - 1))]);
    }
  for (int i = 2; i <= n; i++) lg2[i] = lg2[i / 2] + 1;
  memset(dp, 63, sizeof dp);
  memset(tree, 63, sizeof tree);
  dp[0] = 0;
  modify(1, 0, n + 1, 0, 0);
  for (int i = 1; i <= n; i++) {
    if (i - l + 1 < 1) continue;
    int lo = 0, hi = i - l + 1;
    while (lo + 1 < hi) {
      int mid = (lo + hi) >> 1;
      if (get(mid, i))
        hi = mid;
      else
        lo = mid;
    }
    if (get(hi, i)) dp[i] = query(1, 0, n + 1, hi - 1, i - l + 1) + 1;
    modify(1, 0, n + 1, i, dp[i]);
  }
  return cout << (dp[n] < 1061109567 ? dp[n] : -1) << '\n', false;
}
void modify(int id, int b, int e, int p, int val) {
  if (b == e - 1) {
    tree[id] = val;
    return;
  }
  int mid = (b + e) >> 1;
  if (p < mid)
    modify(id << 1, b, mid, p, val);
  else
    modify(id << 1 | 1, mid, e, p, val);
  tree[id] = min(tree[id << 1], tree[id << 1 | 1]);
}
int query(int id, int b, int e, int l, int r) {
  if (b >= r || e <= l) return 1061109567;
  if (b >= l && e <= r) return tree[id];
  int mid = (b + e) >> 1;
  return min(query(id << 1, b, mid, l, r), query(id << 1 | 1, mid, e, l, r));
}
bool get(int be, int en) {
  int p = lg2[en - be + 1];
  int mi = min(mn[p][be], mn[p][en - (1 << p) + 1]);
  int ma = max(mx[p][be], mx[p][en - (1 << p) + 1]);
  return (ma - mi) <= k;
}
