#include <bits/stdc++.h>
using namespace std;
clock_t startTime;
double getCurrentTime() {
  return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const pair<T, U> &_p) {
  _out << _p.first << " " << _p.second;
  return _out;
}
template <typename T, typename U>
inline istream &operator>>(istream &_in, pair<T, U> &_p) {
  _in >> _p.first >> _p.second;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const vector<T> &_v) {
  if (_v.empty()) return _out;
  _out << _v.front();
  for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline istream &operator>>(istream &_in, vector<T> &_v) {
  for (auto &_i : _v) _in >> _i;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const set<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const multiset<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_set<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_multiset<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const map<T, U> &_m) {
  if (_m.empty()) return _out;
  _out << "{\"" << _m.begin()->first << "\", \"" << _m.begin()->second << "\"}";
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it)
    _out << ", { \"" << _it->first << "\", \"" << _it->second << "\"}";
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const unordered_map<T, U> &_m) {
  if (_m.empty()) return _out;
  _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')';
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it)
    _out << ", (" << _it->first << ": " << _it->second << ')';
  return _out;
}
template <typename T>
void out(const vector<T> &a, int n) {
  for (int i = 1; i <= n; ++i) {
    cout << a[i] << ' ';
  }
  cout << "\n";
}
template <typename T>
void out(const vector<vector<T>> &a, int n, int m) {
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      cout << a[i][j] << ' ';
    }
    cout << '\n';
  }
}
template <class T, int MAX_LOG>
struct SparseTable {
  vector<int> logs;
  vector<vector<T>> st, st2;
  void init(int n) {
    logs.resize(n + 1);
    logs[1] = 0;
    for (int i = 2; i <= n; ++i) {
      logs[i] = logs[i / 2] + 1;
    }
    st.assign(MAX_LOG + 1, vector<T>(n));
    st2.assign(MAX_LOG + 1, vector<T>(n));
  }
  void build(const vector<T> &a) {
    int n = a.size(), k = logs[n];
    for (int i = 0; i < n; ++i) {
      st[0][i] = a[i];
      st2[0][i] = a[i];
    }
    for (int j = 1; j <= k; ++j) {
      for (int i = 0; i + (1 << j) <= n; ++i) {
        st[j][i] = min(st[j - 1][i], st[j - 1][i + (1 << (j - 1))]);
        st2[j][i] = max(st2[j - 1][i], st2[j - 1][i + (1 << (j - 1))]);
      }
    }
  }
  T miQuery(int l, int r) {
    int k = logs[r - l + 1];
    return std::min(st[k][l], st[k][r - (1 << k) + 1]);
  }
  T maQuery(int l, int r) {
    int k = logs[r - l + 1];
    return std::max(st2[k][l], st2[k][r - (1 << k) + 1]);
  }
};
const int INF = 1e7;
void solve() {
  int n, s, l;
  cin >> n >> s >> l;
  vector<int> a(n);
  cin >> a;
  vector<int> good(n);
  SparseTable<int, 18> st;
  st.init(n);
  st.build(a);
  for (int i = 0; i < n; ++i) {
    int lo = -1, hi = i, mid;
    while (hi > lo + 1) {
      mid = (lo + hi) / 2;
      if (st.maQuery(mid, i) - st.miQuery(mid, i) <= s)
        hi = mid;
      else
        lo = mid;
    }
    good[i] = hi;
  }
  vector<int> dp(n, INF);
  deque<pair<int, int>> dq;
  int hi = -1;
  for (int i = 0; i < n; ++i) {
    if (good[i] < i - l + 1) {
      while (!dq.empty() && dq.front().first < good[i]) dq.pop_front();
      while (hi < i - l) {
        ++hi;
        while (!dq.empty() && dq.back().second >= dp[hi]) dq.pop_back();
        dq.emplace_back(hi, dp[hi]);
      }
      if (!dq.empty() && dq.front().first >= good[i] &&
          dq.front().first <= i - l) {
        dp[i] = min(dp[i], dq.front().second + 1);
      }
    }
    if (good[i] <= i - l + 1) {
      dp[i] = min(dp[i], good[i] > 0 ? dp[good[i] - 1] + 1 : 1);
    }
  }
  if (dp[n - 1] == INF) dp[n - 1] = -1;
  cout << dp[n - 1];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  startTime = clock();
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
