#include <bits/stdc++.h>
using namespace std;
const int seed = 131;
const long long LLMAX = 2e18;
const int MOD = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 1e6 + 10;
const int hmod1 = 0x48E2DCE7;
const int hmod2 = 0x60000005;
inline long long sqr(long long x) { return x * x; }
inline int sqr(int x) { return x * x; }
inline double sqr(double x) { return x * x; }
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long exgcd(long long a, long long b, long long &x, long long &y) {
  long long d;
  (b == 0 ? (x = 1, y = 0, d = a)
          : (d = exgcd(b, a % b, y, x), y -= a / b * x));
  return d;
}
long long qpow(long long a, long long n) {
  long long sum = 1;
  while (n) {
    if (n & 1) sum = sum * a % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return sum;
}
inline int dcmp(double x) {
  if (fabs(x) < eps) return 0;
  return (x > 0 ? 1 : -1);
}
pair<int, int> q[MAXN];
int st[2][MAXN][20], a[MAXN], dp[MAXN], head = 0, tail = 0;
int query(int l, int r) {
  int len = log2(r - l + 1);
  return max(st[0][l][len], st[0][r - (1 << len) + 1][len]) -
         min(st[1][l][len], st[1][r - (1 << len) + 1][len]);
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, s, len;
  cin >> n >> s >> len;
  for (int i = 1; i <= n; i++) cin >> a[i], st[0][i][0] = 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) return cout << -1 << endl, 0;
  memset(dp, 0x3f3f3f3f, sizeof(dp));
  dp[0] = 0;
  q[tail++] = pair<int, int>(0, 0);
  for (int i = 1; i <= len; i++) dp[i] = 1, q[tail++] = pair<int, int>(1, i);
  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;
    }
    if (ans != -1) {
      while (head < tail && q[head].second < ans - 1) head++;
      if (head < tail && q[head].second <= i - len)
        dp[i] = min(dp[i], q[head].first + 1);
      while (head < tail && q[tail].first >= dp[i]) tail--;
      q[tail++] = pair<int, int>(dp[i], i);
    }
  }
  if (dp[n] == 0x3f3f3f3f) dp[n] = -1;
  cout << dp[n] << endl;
  return 0;
}
