#include <bits/stdc++.h>
using namespace std;
int a[100005], dp[100005], q[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, dif, mn;
  cin >> n >> dif >> mn;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int r = n, l = n;
  multiset<int> set;
  set.insert(a[n]);
  while (l != 0) {
    if (*set.rbegin() - *set.begin() <= dif) {
      l--;
      set.insert(a[l]);
    } else {
      q[r] = l;
      set.erase(set.find(a[r]));
      r--;
    }
  }
  for (; r > 0; r--) {
    q[r] = l;
  }
  memset(dp, -1, sizeof dp);
  dp[0] = 0;
  set.clear();
  l = 0, r = 0;
  for (int i = mn; i <= n; i++) {
    if (dp[r] != -1) set.insert(dp[r]);
    while (l < q[i]) {
      if (set.empty()) break;
      if (dp[l] != -1) set.erase(set.find(dp[l]));
      l++;
    }
    if (!set.empty()) dp[i] = *set.begin() + 1;
    r++;
  }
  cout << dp[n];
}
