#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
int n, s, l, a[N], dp[N], best[N];
int main() {
  scanf("%d %d %d", &n, &s, &l);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i);
  multiset<int> st;
  int i = 1;
  for (int j = 1; j <= n; ++j) {
    st.insert(a[j]);
    while (st.size() && *(--st.end()) - *st.begin() > s) {
      st.erase(st.find(a[i]));
      ++i;
    }
    best[j] = i;
  }
  st.clear();
  st.insert(1e9);
  dp[0] = 0;
  int left = 1;
  for (i = 1; i <= n; ++i) {
    dp[i] = 1e9;
    int newL = best[i], newR = i - l + 1;
    if (newR >= 1) st.insert(dp[newR - 1]);
    while (left < newL && left <= newR) {
      st.erase(st.find(dp[left - 1]));
      ++left;
    }
    dp[i] = *st.begin() + 1;
  }
  if (dp[n] < 1e9)
    printf("%d\n", dp[n]);
  else
    puts("-1");
  return 0;
}
