#include <bits/stdc++.h>
using namespace std;
int n, s, l;
int a[1000005], dp[1000005], L[1000005];
int main() {
  scanf("%d%d%d", &n, &s, &l);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  deque<int> q;
  int pos = 1;
  for (int i = 1; i <= n; i++) {
    while (q.size() && a[i] - a[q.front()] > s)
      pos = q.front() + 1, q.pop_front();
    L[i] = pos;
    while (!q.empty() && a[i] < a[q.back()]) q.pop_back();
    q.push_back(i);
  }
  pos = 1, q.clear();
  for (int i = 1; i <= n; i++) {
    while (q.size() && a[q.front()] - a[i] > s)
      pos = q.front() + 1, q.pop_front();
    L[i] = max(L[i], pos);
    while (q.size() && a[i] > a[q.back()]) q.pop_back();
    q.push_back(i);
  }
  for (int i = 1; i <= n; i++) dp[i] = 0x3f3f3f3f;
  q.clear();
  q.push_back(0);
  for (int i = 1; i <= n; i++) {
    while (q.size() && q.front() < L[i] - 1) q.pop_front();
    if (q.size() && q.front() <= i - l) dp[i] = dp[q.front()] + 1;
    while (q.size() && dp[i] < dp[q.back()]) q.pop_back();
    q.push_back(i);
  }
  printf("%d\n", dp[n] >= 0x3f3f3f3f ? -1 : dp[n]);
}
