#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, l;
  cin >> n >> s >> l;
  int a[n + 1], g[n + 1], f[n + 1];
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int min1 = 1000000000 + 7, max1 = -min1;
  g[0] = 0;
  multiset<int> s1, s2;
  int st = 1;
  for (int i = 1; i <= n; ++i) {
    s1.insert(a[i]);
    s2.insert(-1 * a[i]);
    min1 = (*s1.begin());
    max1 = (-1 * (*s2.begin()));
    while (max1 - min1 > s) {
      s1.erase(s1.find(a[st]));
      s2.erase(s2.find(-1 * a[st]));
      min1 = (*s1.begin());
      max1 = (-1 * (*s2.begin()));
      st++;
    }
    g[i] = i - st + 1;
  }
  f[0] = 0;
  int inf = 1000000000 + 7;
  st = 0;
  s1.clear();
  for (int i = 1; i <= n; ++i) {
    if (i - g[i] <= i - l) {
      if (i - l >= 0) s1.insert(f[i - l]);
      for (int j = st; j < i - g[i]; ++j) {
        if (s1.find(f[j]) != s1.end()) {
          s1.erase(s1.find(f[j]));
        }
      }
    } else
      s1.clear();
    if (g[i] < l)
      f[i] = inf;
    else {
      f[i] = *(s1.begin()) + 1;
    }
    st = i - g[i];
  }
  if (f[n] >= inf)
    cout << "-1\n";
  else
    cout << f[n] << "\n";
}
