#include <bits/stdc++.h>
using namespace std;
int n, i, j, s, l, c;
int ar[100100];
int dp[100100];
map<int, int> mp, ct;
int main() {
  scanf("%d%d%d", &n, &s, &l);
  mp.clear();
  ct.clear();
  for (int i = 1; i <= n; i++) scanf("%d", &ar[i]);
  for (int i = 0; i <= n; i++) dp[i] = 123123123;
  dp[0] = 0;
  for (int i = 1; i <= l; i++) {
    mp[ar[i]]++;
  }
  c = 0;
  ct[0]++;
  for (int x = l; x <= n; x++) {
    int &ret = dp[x];
    int mx, mn;
    do {
      mn = mp.begin()->first;
      mx = mp.rbegin()->first;
      if (x - c <= l) break;
      if (mx - mn > s) {
        if (ct.size() > 0) {
          ct[dp[c]]--;
          if (ct[dp[c]] == 0) ct.erase(dp[c]);
        }
        c++;
        mp[ar[c]]--;
        if (mp[ar[c]] == 0) mp.erase(ar[c]);
      }
    } while (mx - mn > s);
    if (mx - mn <= s && x - c >= l) {
      int tmp = ct.begin()->first;
      ret = min(ret, tmp + 1);
    }
    mp[ar[x + 1]]++;
    ct[dp[x - l + 1]]++;
  }
  printf("%d\n", (dp[n] == 123123123) ? -1 : dp[n]);
  return 0;
}
