#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
const long long int inf = 1e15 + 100;
long long int dp[N], seg[4 * N], a[N];
multiset<long long int> st;
void add(int x, long long int val, int b = 0, int e = N, int ind = 1) {
  if (b + 1 == e) {
    seg[ind] = val;
    return;
  }
  int mid = (b + e) / 2;
  if (x < mid)
    add(x, val, b, mid, ind * 2);
  else
    add(x, val, mid, e, ind * 2 + 1);
  seg[ind] = min(seg[ind * 2], seg[ind * 2 + 1]);
}
long long int get(int l, int r, int b = 0, int e = N, int ind = 1) {
  if (r <= b || e <= l) return inf;
  if (l <= b && e <= r) {
    return seg[ind];
  }
  int mid = (b + e) / 2;
  long long int x = get(l, r, b, mid, ind * 2);
  long long int y = get(l, r, mid, e, ind * 2 + 1);
  return min(x, y);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, second, l;
  cin >> n >> second >> l;
  for (int i = 0; i < n; i++) cin >> a[i];
  int p = 0;
  for (int i = 0; i < n; i++) {
    st.insert(a[i]);
    while ((*st.rbegin()) - (*st.begin()) > second) {
      st.erase(st.lower_bound(a[p]));
      p++;
    }
    dp[i] = get(p, i - l + 2) + 1;
    add(i + 1, dp[i]);
  }
  if (dp[n - 1] >= inf) dp[n - 1] = -1;
  cout << dp[n - 1] << endl;
  return 0;
}
