#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const long long mod = 1e9 + 7;
const int maxn = 1e6 + 5;
const int inf = 2e9;
int n, s, l;
int dp[maxn];
int a[maxn];
multiset<int> active, dpset;
bool good() {
  if (active.empty()) return true;
  int hi = *active.rbegin();
  int lo = *active.begin();
  return hi - lo <= s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s >> l;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int j = 0;
  for (int i = 0; i < n; i++) {
    active.insert(a[i]);
    while (!good()) {
      assert(active.find(a[j]) != active.end());
      active.erase(active.find(a[j]));
      if (dpset.find(dp[j]) != dpset.end()) {
        dpset.erase(dpset.find(dp[j]));
      }
      j++;
    }
    if (i - l + 1 >= j) {
      dpset.insert(dp[i - l + 1]);
    }
    if (dpset.size()) {
      dp[i + 1] = min(inf, 1 + *dpset.begin());
    } else {
      dp[i + 1] = inf;
    }
  }
  int ans = dp[n] == inf ? -1 : dp[n];
  cout << ans << endl;
  return 0;
}
