#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
template <typename T, typename S>
inline bool REMIN(T &a, const S &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T, typename S>
inline bool REMAX(T &a, const S &b) {
  return a < b ? a = b, 1 : 0;
}
int toint(const string &s) {
  stringstream ss;
  ss << s;
  int x;
  ss >> x;
  return x;
}
string tostring(int number) {
  stringstream ss;
  ss << number;
  return ss.str();
}
int bit(long long x, int pos) { return ((1ll << pos) & x) ? 1 : 0; }
int find(vector<int> &C, int x) {
  return (C[x] == x) ? x : C[x] = find(C, C[x]);
}
void merge(vector<int> &C, int x, int y) { C[find(C, x)] = find(C, y); }
void split(vector<string> &v, string t) {
  stringstream s;
  s << t;
  while (s >> t) v.push_back(t);
}
const int INF = 1e9;
const int NMAX = 1e5 + 2;
const long long MOD = 1000000007;
const long double PI = 2 * acos(0);
long long T, N, M, L;
int a, b;
string s;
void nope(int dec = 0) {
  if (!dec) cout << "NO";
  exit(0);
}
vector<int> arr;
int allo[NMAX];
long long f[NMAX];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M >> L;
  for (int(i) = int(0); (i) <= int(N - 1); ++(i)) {
    cin >> a;
    arr.push_back(a);
  }
  deque<pair<long long, long long> > mi, ma;
  allo[0] = 0;
  int mil = 0, mal = 0;
  mi.push_back({arr[0], 0});
  ma.push_back({arr[0], 0});
  for (int(i) = int(1); (i) <= int(N - 1); ++(i)) {
    while (!mi.empty() && mi.back().first >= arr[i]) mi.pop_back();
    while (!ma.empty() && ma.back().first <= arr[i]) ma.pop_back();
    mi.push_back({arr[i], i});
    ma.push_back({arr[i], i});
    while (ma.front().first - mi.front().first > M) {
      bool miless = mi.front().second < ma.front().second;
      bool eq = mi.front().second == ma.front().second;
      if (miless || eq) {
        mil = mi.front().second + 1;
        mi.pop_front();
      }
      if (!miless || eq) {
        mal = ma.front().second + 1;
        ma.pop_front();
      }
    }
    allo[i] = max(mil, mal);
  }
  for (int(i) = int(0); (i) <= int(N - 1); ++(i)) {
    f[i] = INF;
  }
  if (1 == L) f[0] = 1;
  deque<pair<long long, long long> > mif;
  int mifl = 0;
  for (int(i) = int(0); (i) <= int(N - 1); ++(i)) {
    while (!mif.empty() && mif.front().second < allo[i] - 1) {
      mif.pop_front();
    }
    f[i] = INF;
    if (allo[i] == 0 && i >= L - 1)
      f[i] = 1;
    else if (!mif.empty())
      f[i] = mif.front().first + 1;
    if (i - L + 1 >= 0) {
      while (!mif.empty() && mif.back().first > f[i - L + 1]) mif.pop_back();
      mif.push_back({f[i - L + 1], i - L + 1});
    }
  }
  if (f[N - 1] < INF) {
    cout << f[N - 1];
  } else
    cout << -1;
  return 0;
}
