#include <bits/stdc++.h>
const int N = 100000 + 100;
const int mod = 1e9 + 7;
const int inf = 0x7fffffff;
using namespace std;
int n, s, len;
int a[N], st[3][N][25];
long long f[N], head = 1, tail = 1;
pair<long long, int> q[N * 100];
int query(int l, int r) {
  int k = log2(r - l + 1);
  return max(st[0][l][k], st[0][r - (1 << k) + 1][k]) -
         min(st[1][l][k], st[1][r - (1 << k) + 1][k]);
}
int main() {
  scanf("%d %d %d", &n, &s, &len);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    st[0][i][0] = a[i];
    st[1][i][0] = a[i];
  }
  for (int j = 1; j < 20; j++)
    for (int i = 1; i <= n; i++)
      if (i + (1 << (j - 1)) <= n) {
        st[0][i][j] = max(st[0][i][j - 1], st[0][i + (1 << (j - 1))][j - 1]);
        st[1][i][j] = min(st[1][i][j - 1], st[1][i + (1 << (j - 1))][j - 1]);
      }
  if (len > n || query(1, len) > s) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) f[i] = 99999999999;
  f[0] = 0;
  q[tail++] = {0, 0};
  for (int i = 1; i <= len; i++) f[i] = 1;
  for (int i = len + 1; i <= n; i++) {
    int l = 1, r = i - len + 1, ans = -1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (query(mid, i) <= s) {
        r = mid - 1;
        ans = mid;
      } else
        l = mid + 1;
    }
    while (head < tail && q[tail - 1].first >= f[i - len]) tail--;
    q[tail++] = {f[i - len], i - len};
    if (ans != -1) {
      while (head < tail && q[head].second < ans - 1) head++;
      if (head < tail) f[i] = min(f[i], q[head].first + 1);
    }
  }
  if (f[n] == 99999999999) f[n] = -1;
  printf("%d\n", f[n]);
  return 0;
}
