#include <bits/stdc++.h>
using namespace std;
int N, S, L, A[100009];
int c[100009], dp[100009];
multiset<int> s, t;
int main() {
  scanf("%d%d%d", &N, &S, &L);
  for (int i = 1; i <= N; i++) dp[i] = 1e6;
  for (int i = 1, ptr = 1; i <= N; i++) {
    scanf("%d", &A[i]);
    s.insert(A[i]);
    while (s.size() > 1 && *(--s.end()) - *s.begin() > S) {
      s.erase(s.find(A[ptr]));
      ptr++;
    }
    c[i] = ptr - 1;
  }
  for (int i = 1, ptr = 0; i <= N; i++) {
    if (i >= L) t.insert(dp[i - L]);
    while (ptr < c[i] && ptr <= i - L) {
      auto it = t.find(dp[ptr]);
      if (it != t.end()) t.erase(it);
      ptr++;
    }
    if (t.size()) dp[i] = *t.begin() + 1;
  }
  printf("%d\n", dp[N] >= 1e6 ? -1 : dp[N]);
}
