#include <bits/stdc++.h>
using namespace std;
set<int> all;
map<int, int> cnt;
vector<int> t;
void modify(int v, int add) {
  t[v] = add;
  v /= 2;
  while (v >= 1) {
    t[v] = min(t[v * 2], t[v * 2 + 1]);
    v /= 2;
  }
}
int get(int v, int cl, int cr, int l, int r) {
  if (l > cr || r < cl) {
    return 1e9;
  }
  if (cl >= l && cr <= r) {
    return t[v];
  }
  int mid = (cr + cl) / 2;
  return min(get(v * 2, cl, mid, l, r), get(v * 2 + 1, mid + 1, cr, l, r));
}
void out(int i) {
  int cnt = 1, k = 0;
  for (int j = 1; j < t.size(); j++) {
    k++;
    cout << t[j] << ' ';
    if (cnt == k) {
      k = 0;
      cnt *= 2;
      cout << '\n';
    }
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, s, dl;
  cin >> n >> s >> dl;
  int p = 1;
  while (p < n) {
    p *= 2;
  }
  t.assign(p * 2, 1e9);
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> f(n, 0);
  for (int i = 0; i < n; i++) {
    all.insert(a[i]);
    cnt[a[i]]++;
    if (i) {
      f[i] = f[i - 1];
    }
    int j = f[i];
    while (j<i&& * all.rbegin() - *all.begin()> s) {
      cnt[a[j]]--;
      if (!cnt[a[j]]) all.erase(a[j]);
      j++;
    }
    f[i] = j;
  }
  vector<int> dp(n, 1e9);
  dp[0] = (dl == 1 ? 1 : 1e9);
  modify(p, dp[0]);
  for (int i = 1; i < n; i++) {
    if (!(i - f[i] + 1 >= dl)) continue;
    if (f[i] == 0 && i + 1 >= dl) {
      dp[i] = 1;
      modify(i + p, dp[i]);
      continue;
    }
    if (i - f[i] + 1 < dl) {
      dp[i] = 1e9;
      continue;
    }
    if (i - f[i] + 1 >= dl) {
      int it = 1e9;
      int cl = max(i - dl, 0), cr = f[i] - 1;
      if (cl > cr) swap(cl, cr);
      if (cl >= 0 && cr >= 0) it = get(1, p, p * 2 - 1, cl + p, cr + p);
      dp[i] = min(dp[i], it + 1);
    }
    modify(i + p, dp[i]);
  }
  cout << (dp[n - 1] >= 1e9 ? -1 : dp[n - 1]);
  return 0;
}
