#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
double sqr(double a) { return a * a; }
const long long int inf = 100000000000000000LL;
struct Node {
  vector<int> nbr;
  int used;
  int o;
  Node() { used = 0; }
};
void merge(vector<deque<int> >& q) {
  deque<int> ans;
  while (q.size() >= 3) {
    for (int i = 0; i < 3; ++i) {
      int k = q.size() - 1;
      while (q[k].size() > 1) {
        ans.push_back(*q[k].begin());
        q[k].pop_front();
      }
      if (i == 2) {
        ans.push_back(*q[k].begin());
      }
      q.pop_back();
    }
    q.push_back(ans);
  }
}
vector<deque<int> > dfs(vector<Node>& arr, int v) {
  arr[v].used = true;
  vector<deque<int> > res;
  for (int i = 0; i < arr[v].nbr.size(); ++i) {
    int to = arr[v].nbr[i];
    if (!arr[to].used) {
      vector<deque<int> > r = dfs(arr, to);
      for (int j = 0; j < r.size(); ++j) {
        r[j].push_back(v);
        r[j].push_front(v);
        merge(r);
        res.push_back(r[j]);
        merge(res);
      }
    }
  }
  if (arr[v].o) {
    deque<int> c;
    c.push_back(v);
    res.push_back(c);
  }
  merge(res);
  return res;
}
void solve(vector<Node>& arr, int ind) {
  auto q = dfs(arr, ind);
  for (int i = 0; i < arr.size(); ++i) {
    if (arr[i].o == 1 && arr[i].used == 0) {
      cout << -1;
      exit(0);
    }
  }
  vector<int> ans;
  while (q.size() > 0) {
    int k = q.size() - 1;
    while (q[k].size() > 1) {
      ans.push_back(*q[k].begin());
      q[k].pop_front();
    }
    q.pop_back();
  }
  int a = 0;
  for (int i = 0; i < ans.size(); ++i) {
    if (ans[i] == ind) {
      ++a;
    }
  }
  if (a % 2 == 0) ans.push_back(ind);
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] + 1 << " ";
  }
}
int main() {
  clock_t start = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << setprecision(15);
  long long int n, s, l;
  cin >> n >> s >> l;
  vector<long long int> arr(n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  set<pair<long long int, long long int> > st;
  vector<long long int> ans(n + 1, 1000000000000000LL);
  ans[0] = 0;
  for (int i = 0; i < n; ++i) {
    st.insert(pair<long long int, long long int>(arr[i], i));
    long long int q = st.begin()->first;
    long long int w = st.rbegin()->first;
    while (w - q > s) {
      pair<long long int, long long int> p(arr[i - st.size() + 1],
                                           i - st.size() + 1);
      st.erase(p);
      q = st.begin()->first;
      w = st.rbegin()->first;
    }
    while (st.size() >= l) {
      ans[i + 1] = min(ans[i + 1], ans[i - st.size() + 1] + 1);
      if (ans[i + 1] == 1000000000000000LL) {
        pair<long long int, long long int> p(arr[i - st.size() + 1],
                                             i - st.size() + 1);
        st.erase(p);
      } else {
        break;
      }
    }
  }
  if (ans[n] == 1000000000000000LL)
    cout << "-1";
  else
    cout << ans[n];
  return 0;
}
