#include <bits/stdc++.h>
using namespace std;
int n, s, l, a[100005];
int dp[100005];
set<pair<int, int> > S, R;
int main() {
  scanf("%d %d %d", &n, &s, &l);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(dp, 0, sizeof dp);
  int j = 1;
  for (int i = 1; i <= n; i++) {
    S.insert(pair<int, int>(a[i], i));
    while (!S.empty() && S.rbegin()->first - S.begin()->first > s) {
      S.erase(pair<int, int>(a[j], j));
      j++;
    }
    if (i >= l && dp[i - l] != -1) R.insert(pair<int, int>(dp[i - l], i - l));
    while (!R.empty() && R.begin()->second < j - 1) R.erase(R.begin());
    if (R.empty())
      dp[i] = -1;
    else
      dp[i] = R.begin()->first + 1;
  }
  printf("%d\n", dp[n]);
  return 0;
}
