#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, Mod = 1e9 + 7, MAXN = 1e3 + 10, LG = 20, M = 1e9,
          P = 727, Sq = 445 + 5;
const long long inf = 3e18 + 10;
int f[N], mx[N][25], mn[N][25], seg[4 * N], a[N], n, m, k;
bool Check(int l, int r) {
  int t = f[r - l + 1];
  if (max(mx[l][t], mx[r - (1 << t) + 1][t]) -
          min(mn[l][t], mn[r - (1 << t) + 1][t]) >
      k)
    return 0;
  return 1;
}
void Add(int s, int e, int ind, int l, int r, int x) {
  if (s >= l && e <= r) {
    seg[ind] = x;
    return;
  }
  int mid = (s + e) / 2;
  if (l < mid) Add(s, mid, (2 * (ind)), l, r, x);
  if (r > mid) Add(mid, e, ((2 * (ind)) + 1), l, r, x);
  seg[ind] = min(seg[(2 * (ind))], seg[((2 * (ind)) + 1)]);
  return;
}
int Query(int s, int e, int ind, int l, int r) {
  if (s >= l && e <= r) return seg[ind];
  int mid = (s + e) / 2, ret = Mod;
  if (l < mid) ret = min(ret, Query(s, mid, (2 * (ind)), l, r));
  if (r > mid) ret = min(ret, Query(mid, e, ((2 * (ind)) + 1), l, r));
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> m;
  for (int i = 1; i <= n; i++) f[i] = log2(i);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mn[i][0] = mx[i][0] = a[i];
  }
  if (m > n) return cout << -1, 0;
  for (int j = 1; j <= 20; j++) {
    for (int i = 1; i <= n - (1 << j) + 1; i++) {
      mn[i][j] = min(mn[i][j - 1], mn[i + (1 << (j - 1))][j - 1]);
      mx[i][j] = max(mx[i][j - 1], mx[i + (1 << (j - 1))][j - 1]);
    }
  }
  if (!Check(1, m)) return cout << -1, 0;
  for (int i = 0; i <= m - 1; i++) Add(0, n + 1, 1, i, i + 1, 0);
  Add(0, n + 1, 1, m, m + 1, 1);
  for (int i = m + 1; i <= n; i++) {
    if (!Check(i - m + 1, i)) {
      Add(0, n + 1, 1, i, i + 1, Mod);
      continue;
    }
    int l = m - 1, r = i + 1;
    while (r - l > 1) {
      int mid = (r + l) / 2;
      if (Check(i - mid + 1, i))
        l = mid;
      else
        r = mid;
    }
    int x = Query(0, n + 1, 1, i - l, i - m + 1);
    if (i - l < m && l < i) {
      if (i >= 2 * m)
        x = 2;
      else
        x = Mod;
    }
    if (x == Mod) {
      Add(0, n + 1, 1, i, i + 1, Mod);
      continue;
    }
    Add(0, n + 1, 1, i, i + 1, x + 1);
  }
  int ans = Query(0, n + 1, 1, n, n + 1);
  if (ans == Mod) return cout << -1, 0;
  return cout << ans, 0;
}
